Skip to content
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

Update code to manage exact result as first result when existing #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThomasG77
Copy link
Contributor

@ThomasG77 ThomasG77 commented Feb 4, 2025

Return exact match(es) first when no boost e.g by population as scoring algorithm does not rank more exact matches than other case e.g scoring for search "mont" is not higher than the one with montagne a subset of mont.
PR only work for single name and is untested with compound cities names like something like Aix-Les-Bainsas we would need to manage multiples terms and separators in this case.

The other options to maybe adopt later on will be to upgrade Lunr to 2.X version. It may causes other issues due to some changes https://lunrjs.com/guides/searching.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant