Questions tagged [chewy-gem]

Chewy is an ODM and wrapper for the official Elasticsearch client, sponsored by Toptal.

Chewy is an ODM and wrapper for the official Elasticsearch client, sponsored by Toptal. https://github.com/toptal/chewy

51 questions
0
votes
1 answer

Rails - Elasticsearch - search by coordinates with Chewy

I'm using Elasticsearch on my Rails APP trhough gem 'chewy'. I have two models: Products and Tags [many to many relationship, managed through ProductTag model]. I defined ProductsIndex as follow: class ProductsIndex < Chewy::Index define_type…
davideghz
  • 3,596
  • 5
  • 26
  • 50
0
votes
0 answers

Avoid DB queries with Chewy

I am using the Elasticsearch library for Rails, Chewy. I am trying to figure out a way to effectively bulk import ~2 million records. These are Elasticsearch documents that are denormalized version of a few different DB models that I have. I am…
pech0rin
  • 4,588
  • 3
  • 18
  • 22
0
votes
1 answer

Elastic search & chewy: make results uniq based on item content

Sorry for the lack of clarity of the title, but I'm not sure on how to express my problem in a simple sentence. To explain: the application I work on currently has multiple type of objects that can be linked to tags, added by the user. Currently,…
Vincent
  • 620
  • 7
  • 19
0
votes
1 answer

Link to the Model element from search results (Chewy, Rails)

I have implemented a search for User model (Elasticsearch using Chewy gem). views/search/search.html.erb: <%= form_tag search_path, method: "get" do %> <%= label_tag(:q, "Search by name/ surname/ email:") %> <%= text_field_tag(:q) %> <%=…
electrify
  • 155
  • 1
  • 10
0
votes
1 answer

How to create { x = y | y = z | z = 0 } block dynamically from hash?

Although the context is likely irrelevant, I'm using the Chewy gem to filter Elasticsearch results using this code: scope = scope.filter { (send('facet_properties').send(property_ids[0], :or) == val.map(&:to_i)) | …
Matt Dunbar
  • 950
  • 3
  • 11
  • 21
-1
votes
1 answer

When i delete product in product table then productIndex not update

When i delete product in product table then productIndex not update. My Query: Product.friendly.where(slug: params[:id]).first.destroy_fully! Model: class Product < ApplicationRecord acts_as_paranoid #for soft Delete extend FriendlyId…
1 2 3
4