Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

return one if exact match? #440

Open
cellulosa opened this issue Jun 4, 2024 · 1 comment
Open

return one if exact match? #440

cellulosa opened this issue Jun 4, 2024 · 1 comment

Comments

@cellulosa
Copy link

heya thanks for the great library.

consider the following scenario:

titles to search:

  • title
  • title1

currently, if I search for titl I get both. Also If I search for title I get both, but in this instance there is an exact match.
Is it possible to tweak the settings to return only the exact match, if found?

I can obviously add a logic outside of the search, but I was wondering if there is a flexsearch way of doing this.

Thanks

@kunal-singh
Copy link

Have you tried tokenize:"strict" while initialising the index?

Here it is in the documentation.

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

No branches or pull requests

2 participants