Pagefind as general faceting search engine #512
Replies: 1 comment 6 replies
-
Very cool demo! Thanks for sharing. The question
Definitely. It isn't something that has had a lot of thought put in (yet), but I am keen to do some refinement on this use-case. The obstacles
Hmm, I'm interested to hear what you're experiencing here. Pagefind does implicitly support numbers for sorting, in that the Let me know if I'm missing the point of this somewhat!
Correct (currently). Some of Pagefind's limitations derive from the low-bandwidth constraint that everything is built under, and this is a great example of that. Implementing a fixed Instead, sorting is effectively pre-calculated. So for a given set of results The downside is that we don't know concretely what price For most use-cases this is a good balance, so I'm keen to keep it as the default, but I'm open to exposing better information for faceted search implementations to use. Data like filters are already loaded as separate index chunks on demand, so it would be reasonable to output optional files containing more sorting data that can be loaded for applications that require them. Depending on the size of the datasets you're wanting to target, we can also look at bandwidth reduction within these files — for example they only need to index various price points as indices, such that a lookup can determine that the $50 price point occurs at index Anyway, that's a lot of my current thoughts on it 🙂 Let me know if this is something you're imminently wanting to pursue, and I can start looking at the API design we might need to support it well. As an aside, these use-cases are also something I'm hoping to support better through the still-in-flux Modular UI, so that Pagefind can provide both the engine and the search frontend. |
Beta Was this translation helpful? Give feedback.
-
Backstory
I'm looking for client-side faceting search engine. See my article. I found 3 solutions: Tanstack table, Orama, Itemsjs.
Then I implemented my own search engine: facets
Then I realized that pagefind also capable of doing faceted search. (I missed it on my initial search). So I tried to use pagefind.
Repo: https://github.com/stereobooster/pagefind-instantsearch
Demo: https://pagefind-instantsearch.netlify.app/search/
But there are many obstacles in order to use it as general solution:
doesn't support numbers for sortingThe question
Is this use case (general faceted search engine) something you would consider for the future?
Beta Was this translation helpful? Give feedback.
All reactions