You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature, an issue, or report a bug?
Issue
What is the current behaviour?
Exact match result is not the first item returned
If the current behaviour is a bug, please provide the steps to reproduce.
This is the returned array for the query=lille with City.fuzzySearch(query).limit(5).exec() :
You can solve this issue by sorting this array by metascore that is confidence score the top results(all having highest confidance score) by length in increating order so "Lille" will always come first . I think even if they are not sorting result I think "Lille" should still be higher than other result with same score as gramitically "Lille" will appear higher in database than other words .
Do you want to request a feature, an issue, or report a bug?
Issue
What is the current behaviour?
Exact match result is not the first item returned
If the current behaviour is a bug, please provide the steps to reproduce.
This is the returned array for the
query=lille
withCity.fuzzySearch(query).limit(5).exec()
:What is the expected behaviour?
Exact match "Lille" should have a higher confidenceScore than the others
I'm using this function to bring the exact match up :
If this is a feature request, what is the motivation or use case for changing
the behaviour?
Please mention other relevant information such as Node.js and mongoose version.
node v14.4.0
mongoose 5.11.15
The text was updated successfully, but these errors were encountered: