I am having trouble with Fuzzy Queries giving higher relevance to Fuzzy Hit terms than Direct Match on Python Whoosh. Is there any existing options available within the library to score direct matches higher? or I have to separately code it (i.e.do both Direct Query and Fuzzy Query and rank the text one higher...)? Thanks for the advice.
Asked
Active
Viewed 413 times
1 Answers
1
To answer my own question, I found a crude solution via stacking of queries:
- Perform 2 separate searches: (1) Query for direct/exact match, (2) Fuzzy Query.
- Then, do any "extend(results)" method to stack the (1) result above (2) result. The method will handle duplicates too. See: https://whoosh.readthedocs.io/en/latest/api/searching.html
However, the scores still remain unchanged.

James L
- 31
- 1
- 3