Fuzzy Search Results = Most Relevant on Top
If I do a fuzzy search for Smith, and I have an IndexKey 'FamilyName', with smith and smath, when I do this query
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 ) )
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:
Exact match will have more relevance.