I'm just implementing elasticsearch on my database of foods, and I'm having difficulty understanding why I'm seeing the results I'm seeing.
I'm searching the USDA food database.
When I pass in the query for Banana, I get back all forms of singular for Banana, and one entry Bananas, dehydrated, or banana powder
.
When I pass the query Bananas, I get the above mentioned entry, as well as Bananas, Raw
, which is the entry I am trying to get.
I search really simply using
foods = Foods.search(params[:name],:page_size=>100) return render :json => foods
I've tried looking at both the tire and elasticsearch documentation, but don't really understand what it is trying to tell me about implementing kstem or other ways of tuning the search, and I also would think if one type of 'bananas', gets returned, the other type should as well.