I'm trying to implement fuzzy matching, and wanted to get a sanity check,
as I'm hitting what was initially a surprising use case.
Let's say I have an index with documents: [{'name' => 'Coleman'}, {'name'
=> 'Boleman'}]. Doing a fuzzy_like_this search for 'coleman' will
non-deterministically return either document first, whereas before I read
up on the details of fuzzy search I would have expected the results to have
taken distance into account.
After reading some of the documentation and relevant posts on this forum, I
understand that what it's doing is expanding the search to all terms in the
index within a percentage-wise distance of the word. So in the above
example, my current understanding is that a search for 'coleman' is
literally the same thing as searching for 'coleman' and 'boleman'.
First of all, is this correct? Second, is how do I achieve my desired
behavior?
My first thought is to do a dis_max query with both a text and
fuzzy_like_this. Would anyone pursue a different strategy instead?
Thanks!
-Woody