I have been experimenting with elasticsearch recently with ruby ββon rails. I am having problems indexing my data, so I can search for items with multiple and non-multiple keywords.
The bus will allow me to assign an analyzer for each display attribute:
mapping do indexes title, analyzer: 'snowball' indexes body, analyzer: 'snowball' end
Now let's say I have a keyword in the name 'tests'
if I do a search with an attribute in the request: http: // localhost: 9200 / myindex / mymapping / _search? q = title: test This will work.
However, if I do a general search without specifying an attribute like this:
http: // localhost: 9200 / myindex / mymapping / _search? q = test
He will not find the document.
How do I indicate that I want the analyzer to be "snowball" by default, so I donβt need to specify the attribute that I want to find?
ps I am using Tire Gem. Therefore, please respond as best as possible, given this.
source share