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

search results are returned when they shouldn't be, with non matching terms highlighted #599

Open
louismorgan-linaro opened this issue Apr 17, 2024 · 2 comments

Comments

@louismorgan-linaro
Copy link

If you go to the demo here https://mdn.pagefind.app/ and type in sdafadsfasdf (for example), 23 results are returned all seeming to match the sd part of the query.

I have seen in my own website that I'm developing even weirder behaviour where something like the word intermediate will be matched along with things like sd.

I can only assume this is a bug to do with stemming/backtracking etc. ?

@bglw
Copy link
Contributor

bglw commented Apr 18, 2024

Currently not a bug per-se, but just the effect of Pagefind's backtracking not having a cap, so it'll backtrack your query until it finds something.

Some sane limit should be put on this, but in the absence of picking some arbitrary sane limit I have left it with no limit 😅

Open to suggestions!

@louismorgan-linaro
Copy link
Author

Any possibility to have it configurable with pagefind.options or similar?

I can see that in some circumstances this behaviour would be desirable but in other cases not, so letting the user configure it makes the most sense ( and the default can be as is, of course)

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

2 participants