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

How to perform full word searching in Lunr.js for Svelte? #526

Open
AnanduVFX opened this issue Apr 27, 2023 · 0 comments
Open

How to perform full word searching in Lunr.js for Svelte? #526

AnanduVFX opened this issue Apr 27, 2023 · 0 comments

Comments

@AnanduVFX
Copy link

Please go through the sample svelte application which uses the Lunr.js library to perform searching through a document:
Lunr.js - Svelte

I am trying to search for the term 'example'. However, I am only able to get the expected result if I type 'exampl'. I would like to search through the document and print results for every matching item when pressing a key. I tried using the wildcard (*) property like so:

results = index.search(query + '*')

Using this method, I am able to print the matching result for every key press. However, when I type the full word 'example', the result is empty.

How can I perform single, partial, and full word searching?

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

No branches or pull requests

1 participant