srid / neuron

Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote)
https://neuron.zettel.page
GNU Affero General Public License v3.0
1.51k stars 149 forks source link

Bring back client-side search #567

Open srid opened 3 years ago

srid commented 3 years ago

Originally we had a JavaScript based search that used cache.json to search zettels by title or tag. It got replaced by GHCJS-based Impulse search, but that turned out to be very slow on larger notebooks, so it got removed. So let's reinstate the old search feature, based on JavaScript or any other language that compiles directly to JS (without runtime overhead), such as TypeScript and PureScript.

Look into using elasticlunr.js of #568

srid commented 3 years ago

https://blog.fission.codes/stork-search-james-little/

Stork is two things. First, it's an indexer: it indexes your loosely-structured content and creates a file that you can upload to your web server. Second, it's a Javascript + WebAssembly frontend for that index file: Stork will hook into an <input> on your web page, download the index you've specified, and display the best search results immediately to your user, as they type. The precomputed index and WebAssembly frontend module make the entire Stork engine very good, and very fast.


Some inspiration for the UX part of search: https://vitepress.vuejs.org/ (check the top right corner)