Faceted search
Faceted search is a method of searching through data by using βfacetsβ (data attributes), to gradually narrow down a large data set. In case of markdown notes data attributes can come from front matter.
Options
Core
- expose full content as JSON, similar to what I did in graph.json β + facets β
- cons: not scalable for text search
- add filters to HTML (
data-pagefind-filter
) in hidden div + pagefind β- cons: there are issues related to faceting, see Discussion: Pagefind as general faceting search engine β
- hybrid solution: use pagefind for text search and facets lib for faceting
Other less-feasible options:
- SQLite WASM + HTTP range β
- I read somewhere that SQLiteβs text index is not optimal for this use-case (that is why the author tried to use tantivy - see next line)
- tantivy compiled to WASM β
UI
InstantSearch β- write own simple components
TODO
- I created basic proof of convept using facets and InstantSearch β. I donβt like it, though. It supports facets for:
- tags
- date
- I still can use
facets
orpagefind
, but I need different UI.- Use something slim, like Preact or Solid. But I canβt find good components library. Or give up and use React. Then I can use
shadcn/ui
and many others - Maybe implement custom pagefind UI (@pagefind/modular-ui β)
- Use something slim, like Preact or Solid. But I canβt find good components library. Or give up and use React. Then I can use
- Other potential fields for facets
- maybe
stage
field (make it a separate field instead of emojis in title π§ , π·, π§) - maybe tasks count (closed, open, total)
- maybe
- Sort by
- date
- title
- task count