Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This certainly does look like an interesting solution, I'd be keen to try it myself. However, just in case you didn't already know about Lunr (https://lunrjs.com/), it is fairly commonly used to implement search on static websites.

e.g. https://squidfunk.github.io/mkdocs-material/

There are of course other similar libraries too.

EDIT: Whoops, just saw a few comments below Lunr is already mentioned.



yeah I have come across Lunr and maybe a couple of other things in my research and I think for blogging it'll work well. What I'm interested in finding out is what works for a larger static site, that won't require you to load the index up-front. I'm also curious about how this sqlite thing picks the correct range to load (haven't looked at the code) and what the worst case might be.


> I'm also curious about how this sqlite thing picks the correct range to load

Indexes are usually btree, it finds what and where the relevant index is (probably from the schema queries), then goes trawling through the b-tree.

That’s how db engines normally work, they don’t liberally go through the entire db contents.

If there’s no index then it finds the start of the table and scans it sequentially (which is exactly what it sounds like).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: