Open asazernik opened 5 years ago
I think it is possible to achieve something similar combining boosts and edit distance, e.g increasing the edit distance reduces the amount of boost:
foo~1^100 foo~2^10 foo~3^1
In the current implementation the edit distance and wildcards just allow you to match more terms, they don't have any impact by themselves on how relevant those terms are to your query.
A cool feature (or even plugin) would be to provide just a term, say "beans", and a query with the right boosts and wildcards/edit distance applied that would give reasonable results. The current search
and query
methods are a little lower level than that.
I'm having the same issue when searching on a firstName field: For "Lissah" both "Lissa" and "Lissah" have the same score and for some reason the exact match is not the first option.
e.g. with editDistance of 3 and query of "beans", both "beans" and "bran" match with the same score. Search relevance decaying with edit distance would make this feature much more useful.
I have tested this on 2.3.5.