-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Client-side full-text search #568
Comments
I can maybe look at this--I'm not a search expert, but the ElasticLunr docs look pretty friendly. The issue says this depends on the seemingly more basic reinstatement of client-side search, and I'm understanding the idea here is to use the I'm not a Haskell developer, so I won't be much use in the first step, but once there is a cache file, I could pick this up to start it rolling. And if so, my thought would be to:
Then, once the general approach is validated
And, finally, if generating the search index in the client is too slow, investigate what moving that to a server-side (pre)-render might look like. Given that this depends on #567, please feel no pressure from me. I'll start looking at mdBook and ElasticLunr in the meantime--they look quite interesting. |
@flyinggrizzly Feel free to to prototype a working version. I haven't done any research on this, and I don't know how the two issues are exactly related, but I imagine we can do even the non-fulltext metadata search (#567) using elasticlunr itself? /cc @TheMatten who expressed some interest in the PureScript part. |
What does the elasticlunr index look like? If it is not too complex, I can probably quickly do the index generation part done in Haskell. Otherwise, I imagine you'd fiddle with By the way, cache.json is already available in the static site, eg: https://neuron.zettel.page/cache.json |
The index document looks structurally pretty straightforward, but the To start, I would say it'd be better to spike it straight out in JS so we can see what it'll look like in Neuron before committing to replicating search indexing in Haskell. In terms of getting scripts in, is there an easy way to hook into the document |
The cache.json bug is now fixed.
Sounds good.
I guess it depends on how much HTML you plan on writing. If not much, then perhaps write your JS in a separate file like |
Awesome--thank you!
That works for me--I'll figure out which is easiest as a starting point, and get started on this in the next couple days. |
Depends onRelates to #567Checkout how mdBook does full-text search: https://rust-lang.github.io/mdBook/ ... it seems to be using http://elasticlunr.com/docs/index.html
The text was updated successfully, but these errors were encountered: