Newest 'searchkick' Questions - Stack Overflow

Questions tagged [searchkick]

Searchkick learns what your users are looking for. As more people search, it gets smarter and the results get better. It’s friendly for developers - and magical for your users. Intelligent search made easy https://github.com/ankane/searchkick

0
votes
0answers
11 views

Why boolean field value parsing fails for specific field only?

Order model contains two boolean fields 'user_rewards_point' and 'deleted' with default value as false. Both the keys are present in 'search_data' but I'm getting error mentioned below in ActiveJobs ...
3
votes
1answer
24 views

Rails, searchkick (Elasticsearch 2.3) completion suggester error

I'm using a legacy ES 2.3 and searchkick 2.5 versions in an app. A custom mapping is defined in a model. mappings: { my_model: { properties: { ... suggestion: { type: "completion",...
0
votes
1answer
11 views

Searching multiple added 'search_data'

im using the gem searchkick to search an indexed database of products and i need search by multiples indexed data. There is my model of product class Product < ActiveRecord::Base has_many :...
0
votes
0answers
24 views

Global aggregation with non-global aggregation using SearchKick

I'm trying to set up a query that aggregates 2 fields that I have in ElasticSearch, one that I only want to run post query and one that I want to aggregate globally (run it before the query kicks in). ...
0
votes
1answer
44 views

Do we need to install elastic-search while using searchkick in rails

I am using searchkick gem in rails. While doing searching in localhost I am getting error like: Faraday::ConnectionFailed in SalesController#index Connection refused - Connection refused - connect(2) ...
2
votes
1answer
51 views

Create index with new searchkick options in rails console

I am looking for a way to seamlessly update my Elasticsearch index. I am moving from: class Product < ApplicationRecord searchkick end To: class Product < ApplicationRecord searchkick ...
3
votes
2answers
275 views

How to fix 'undefined method `get_aliases' for #<Elasticsearch::API::Indices::IndicesClient:0x00007fc31b6ed558>'

I'm trying to set up ElasticSearch with the Searchkick gem on a Ruby on Rails (5.2.2) project. I'm following the setup instructions from https://github.com/ankane/searchkick but I'm getting the ...
0
votes
0answers
64 views

Complexe searchkick (elasticsearch) on multiple Models with a single query

Looking the best way for search in many Models with a single query submitted by a user. Indexing the main Models with his relations. Currently, the search work on each models, but nothing is "shared" ...
0
votes
1answer
63 views

Searchkick word_start match with nested field

I have a Rails app with searchkick gem. My model has a nested JSON field. I try to make it searchable with word_start match. When I set in explicitly like: class Post < ApplicationRecord ...
1
vote
1answer
85 views

different results from Model.search and SearchKick.search with a named_index

I'm seeing different results from Model.search and SearchKick.search with a index_name. I'm trying to apply apply a cross_fields query to multiple indexes. I got some strange results so I started ...
0
votes
0answers
20 views

Why Searchkick is showing result only for first request after reindex?

I have Elasticsearched 6.6.1 installed on my server working along Searchkick gem in my ruby on rails application. On my product model i added "active" Boolean column which has default true value. I ...
0
votes
0answers
27 views

searchkick: geo_distance_range: how can filter from X km to Y km?

this question is about: https://github.com/ankane/searchkick I would like to know if there is a way to filter something that contains lat and lon indexed using the geo_distance_range (that is not ...
1
vote
1answer
75 views

How to filter results inclusively (AND) with searchkick

I have two models: Worker and Skill. A worker can have multiple skills. Each skill has its own name (e.g. 'php', 'web-development' etc.) In my search form I want to be able to filter workers (with ...
0
votes
1answer
36 views

Searchkick - ranges on 2 separate columns

I'm trying to create multiple ranges with 2 columns. I know multiple ranges can be achieved but I need it to work with 2 columns. In my model I have a min_age and max_age. The user can select ...
0
votes
1answer
52 views

Searchkick query on has_many association

I have an Organiser model, which has has_many :events. The model looks like the following: class Organiser < ApplicationRecord has_many :events, dependent: :delete_all scope :search_import, -&...
0
votes
1answer
42 views

Searchkick autocomplete with multiple attributes

Novice here, having some difficulties implementing an autocomplete using Searchkick and Typeahead/bloodhound. First of all I have a index/welcome home page where I have my input field for my search ...
0
votes
1answer
32 views

Add new rows to index without having to reindex everything?

I'm wanting to add new rows to my database and I'm wanting to reindex these immediately to search on them via searchkick, However, this is taking a while to reindex all of my table I haven't had an ...
0
votes
0answers
35 views

Handle elasticsearch query with special characters

I am using the Searchkick abstraction for our Elasticsearch implementation. This is the config: searchkick( word_middle: [:name], suggest: [:name], searchable: [:name], synonyms: ...
0
votes
1answer
25 views

Searchkick: I would like the results to display the exact match first before listing out the others with sorting?

I would like the results to display the exact match first before listing out the others and that data should be sorted by a-z or z-a (asc/desc)? 1. Maxwell B 2. Maxwell A 3. D Maxwell 4. C Maxwell ...
0
votes
1answer
41 views

Searchkick Aggregation OR

I'm using Searchkick to search for products. It's working great but now I'm adding in filters. Because of the nature of the products I always want to show for the selected filter so rather than using ...
0
votes
1answer
34 views

Search for a specific user's items with Searchkick

I need the ability to search for a user's specific items through has_many associations. I originally had searchkick on my Items model, and now have it on my User model. I also had asked a question a ...
4
votes
2answers
881 views

FORBIDDEN/12/index read-only / allow delete (api) problem

When importing items into my Rails app I keep getting the above error being raised by SearchKick on behalf of Elasticsearch. I'm running Elasticsearch in a Docker. I start my app by running docker-...
0
votes
1answer
67 views

Searching has_many association with Searchkick

I'm attempting to build out a search feature for my app and am running into some issues with being able to search a has_many association. I want it set up so that a user only sees items that they have ...
0
votes
2answers
100 views

How to search by a relationship with Searchkick?

On my app I have a entity called Talent that can have many talent abilities. Like this: #model/talent.rb class Talent < ApplicationRecord searchkick has_many :talent_talent_abilities, ...
0
votes
1answer
36 views

How to search many fields separately with Searchkick?

I started to use the Searchkick gem (Elasticsearch) on my Rails 5 app. Currently I have a search field for a company title. I would like to add a separate dropdown to search for the location ...
0
votes
0answers
54 views

Elasticsearch sort order - lowercase/ upcase issue

it seems that order is inconsistent when you have lower and uppercase strings. I'm just wondering how to do a proper order as a case-insensitive sort. given this mapping property: "name": { "type": "...
0
votes
1answer
17 views

How can I specify a search field for Elastic Search - FATAL — : […] ArgumentError (Must specify fields to search):

My rails 5 app is deployed to Heroku, but the search function results in a 500 status and tells me that I need to specify a search field for Elastic Search. Any help would be greatly appreciated. ...
1
vote
1answer
56 views

Start ElasticSearch in Wercker

We have a Ruby project where we are using Wercker as Continuous Integration. We need to start an Elastic Search service in order to run some integration tests. Locally, we added the Elastic ...
1
vote
2answers
61 views

RSpec: invalid model with searchkick

I'm not very sure I'm doing it right, but I have two models: House that has_one Address. The Address model has: class Address < ApplicationRecord searchkick belongs_to :house end I'm trying ...
0
votes
1answer
37 views

Searchkick and PostgreSQL with money field type

I am trying to enable a search using seachkick, but in my PostgreSQL I have a couple of fields whose type is money. Unfortunately searchkick does not search on those fields; is there anything I need ...
0
votes
1answer
73 views

Rails with Searchkick: getting results with a joined table

I'm starting to use searchkick in my app, and I have two models: House and Address (which belongs to a house). House: class House < ApplicationRecord searchkick has_one :address, dependent: :...
1
vote
1answer
65 views

Rails searchkick cannot get results based on where query

I'm using Searchkick on my Event model in my app. I'm trying to search results only where status: "published". I'm testing this in the console and so far I know there is an event with "Quiz". I get ...
0
votes
1answer
41 views

How to display soft deleted users when searching through searchkick?

I am using searchkick to perform search for users. However it does not display the soft-deleted user's record. I have tried using unscoped too, but that does not work either. User.unscoped.all.search ...
0
votes
0answers
24 views

Shards configuration with custom mappings using searchkick at heroku bonsai addon

I use custom mapping, with nested object: class Candidate < ApplicationRecord searchkick callbacks: :async, merge_mappings: true, mappings: { candidate: { properties: { ...
0
votes
1answer
17 views

Filtering out other users's notes in Searchkick rails 5

I'm a beginner to Ruby on Rails working on a Notebook app. I'm trying using Searchkick to enable users to quickly search their notes. I currently have 2 users (via devise gem). I have just set up ...
1
vote
2answers
153 views

Searchkick `all` for multiple arrays with OR

I need to build a boolean query with searchkick which will check multiple arrays and condition must be true if all elements of an array exist. I wants records which contains ["2019-11-05", "2019-11-...
0
votes
1answer
56 views

Rails searchkick gem, show the distance between two points

I'm using the searchkick gem on my app in order to get results by distance: @items = Item.search params[:search], page: params[:page], per_page: 10, fields: [:title], match: :phrase, location: {near: ...
0
votes
0answers
46 views

Building a report with Elasticsearch-Kibana

So, I'm trying to build a report with Elasticsearch Kibana. I have a couple of questions : Is it possible to group the data of a particular index, in Kibana? I'm using searchkick to generate the ...
0
votes
2answers
34 views

Searchkick reindexing but search doesnt work unless full word is given

I have an Artist model with def search_data { name: name, description: description } end I create two artists Artist.create(name: "Da Vinci", description: "Tortuga") Artist.create(name: ...
0
votes
1answer
63 views

How to exclude records in searchkick?

I need to exclude records from searchkick when it has less than 3 tags. Right now, my search_data function is as follow: def search_data { ... tag_ids: tags.map(&:id) } end Can I do ...
0
votes
1answer
45 views

New record not appearing in elastic search result

Just after creating new record, new record not appearing in listing api although it is getting indexed. New record is appearing when hitting index api again. Using elastic search, implemented through ...
0
votes
1answer
76 views

Elasticsearch DateTime Range Query Inconsistent

I am trying to use elastic search with searchkick in a rails application to query a date range. I have tried many things but this is the current state. I am trying to search by last_contacted which is ...
1
vote
0answers
35 views

What is the difference between elasticsearch index and searchkick reindex

I am migrating from elasticsearch gem to searchkick. Currently we are indexing a particular model by running. Model.__elasticsearch__.create_index! force: true Model.import In searchkick the ...
0
votes
1answer
89 views

how to pass nested hash params to searchkick

I am working on a existing rails app, where they are currently using elasticsearch gem. Now I am trying to switch it to searchkick. I have configured the gem on the app. Currently if I do : Model....
0
votes
1answer
296 views

Searchkick::ImportError while trying to reindex

I am trying to implement elasticsearch on rails app using searchkick as the wrapper. I have a model called Article which hash uuid and title as columns I have added searchkick in Article model. Now ...
0
votes
1answer
143 views

Rails Searchkick Elasticsearch to match multiple word search

I have product model that had name, gender, description etc columns and those columns are included in elasticsearch index via search_data method. Let's assume that I have a product with following ...
0
votes
1answer
62 views

How to add a search filter with scope to Searchkick? (Rails 5)

I'm using Ruby on Rails 5 and the Searchkick gem. I'm using this now in my controller, and it works fine: @blogs = Blog.search(query, where:{published_at: nil}) But I would like to use a scope ...
1
vote
0answers
44 views

How to combine exact phrase and partial matches in searchkick

I need to perform a search compound of exact matches and regular matches, like: honda toyota "hybrid car" and I want to match either honda and toyota with hybrid car. Also I would like to provide this ...
0
votes
1answer
105 views

How to reindex archived as well as non archived data using searchkick

I have a Meeting model which contains archived as well as non archived data. When I am running Model.reindex only non archived data is getting indexed. I want to index non archived data as well so ...
1
vote
0answers
40 views

Is there a way to set multiple index aliases with Searchkick?

Besides the default alias without the timestamp, is there a way to set additional index aliases?