Fuzzy Search Results = Most Relevant on Top
Hi,
If I do a fuzzy search for Smith, and I have an IndexKey 'FamilyName', with smith and smath, when I do this query
FamilyName:Smith~
The results are showing Smath at the top, why is this so, and how can I make it show the most relevant results on top?
Here is a groovy query, which runs off Neo4j Db:
query = new QueryContext( '+(FamilyName:smith~^8)' ).sort( new Sort([ SortField.FIELD_SCORE ] as SortField[] ) )
results
Smath
Smith
Smith
Any tips is appreciated, I would imagine that Smath would have a LOWER field score than Smith?
Re: Fuzzy Search Results = Most Relevant on Top
Make sure you are sorting documents by relevance.
I have used same query for fuzzy search and sorted the documents by relevance than its giving me correct results:
smith
smath
Exact match will have more relevance.