Reputation: 2060
I have a Capture model which uses searchkick:
class Capture < ActiveRecord::Base
searchkick autocomplete: ['name'],
synonyms: [["scallion", "green onion"], ["qtip", "cotton swab"]]
end
I'd like to do a search by name (autocomplete) in the Capture model so I tried this in console:
Capture.search("scallio", autocomplete: true, limit: 10)
In my DB I have one Capture with the name "scallion" and one other with "green onion".
I would have expected that the above search return 2 elements thanks to the synonyms
option but it returns only one item.
Maybe I misunderstood the synonyms
option, or did I miss something else?
Upvotes: 1
Views: 519
Reputation: 3236
Autocomplete does not take synonyms into account at the moment. I'll add a note to the readme.
Upvotes: 1