Search with spaces


(Renu y-2) #1

Hi,
I am indexing a field "name" in multiple ways (not using multifield).
One index is for exact match (keyword lower_case)
One index is for using standard analyzer
One index is using ngram analyzer
One index is using doublemetaphone.

the app should respond back with the best possible match.

Suppose there are multiple records indexed with "center" and "centre" in
it.
Example : "home centre", "epicenter", "epicetre", "mall center" etc.

And if I search for "epi center" I would want "epicenter" and "epicentre"
to come out with more score than "home centre"

This doesnt happen. Any pointers as to how this can be done without using a
gsub(space , '')

For the common eye "epicenter" or epicentre" matches more closely to "epi
centre" however the "Home centre" gets more priority and messes up my
result set.

Thanks
ry

--


(system) #2