Add a maximum search results option #726
Replies: 1 comment 1 reply
-
👋 Hey @michenriksen Thanks for reaching out — love the use case! I can confirm I see the issue where the page hangs. I'll have a wee think about the best way to improve this, there's likely a few things that can be done. I'll train-of-thought some of it here: First, ideally this search would be performant enough to run in its entirety — I'm a little surprised to see the hangup happening at this scale. A good reference would be the MDN Demo, where I don't get any noticeable hang when searching for My first suspicion for the hangup might be when calculating the filters, as my examples lack the amount of filtering being done in your case. Especially that My second suspicion is the amount of lookahead that might be happening. By default, a search for Other performance things that have been on my list:
Finally, we get to looking at something like I'll build that site locally and try a few things out, first to see where the time is being lost and then what can be done to improve it 🙂 |
Beta Was this translation helpful? Give feedback.
-
Hi there!
I work at GitLab, and we are using PageFind on our advisory database site. The search works great for terms like
rails
orflask
, but we've noticed the page hangs when searching for something likecve-
. This is likely because the index contains many results matching this query, as most advisories include a Common Vulnerability Enumeration ID (CVE-YYYY-DDDDD
).We believe a potential solution would be to implement a
max_search_results
option, which would stop the search after, say, 500 results.Is it possible to add such an option?
Thank you for all the work on PageFind. It's an excellent search tool for large static sites! 🙇
Beta Was this translation helpful? Give feedback.
All reactions