-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort best match first #446
Comments
Is there anyone who could help me out? 🙂 |
Here is the solution for this.
Here is the working sample for your data
@pawelczak is this the correct way to tackle this or do you see any other solution. |
This seems to be like an incredibly obvious feature to implement - it is quite easy to implement, should not significantly impact performance, and would result in dramatically better autocompletes. The SurveyJS example demonstrates this issue perfectly: No user starts typing in "Peugeot" with a "t" - they would start typing Toyota with a "t". And if all t's are assumed equal, even when they are clearly not, then Toyota has two and should therefore be put first. Ultimately, this issue makes this library unusable with large autocomplete sets, as users need to type in a significant portion of the entire item before autocorrect even displays the item they want in the list. |
As far as I know the sorting is done by the first letter of the result. How do I sort on matching the "best" result, meaning the most exact match starting from the first letter.
i.e. Now when I search for 'shoe' (with sort enabled), I get
Since 'Shoe' is the "best" match in my opinion, I'd like to place it first in order. What's the best way to accomplish this?
The text was updated successfully, but these errors were encountered: