3 ms·
Push the corpus into SQLite, it has built-in FTS engines[^1]. Then serve it with anything. Unfortunately this needs server side code, but like 30 lines of PHP.
by pmlnr 6y ago
Push the corpus into SQLite, it has built-in FTS engines[^1]. Then serve it with anything. Unfortunately this needs server side code, but like 30 lines of PHP.
[^1]: https://www.sqlite.org/fts5.html https://www.sqlite.org/fts5.html
- ComputerGuru 6y agoYou can do SQLite in the browser but it’ll have to download the entire dB file instead of only opening the pages it needs (because the naive JS port can’t convert page requests to range requests).
- woadwarrior01 6y agoIt should be possible to support loading only the required pages on the browser with SQLite compiled to WASM along with a custom VFS implementation. Here’s a project[1] which does something similar (selectively load the SQLite DB on demand), albeit with the SQLite file in a torrent. [1]: https://github.com/bittorrent/sqltorrent https://github.com/bittorrent/sqltorrent
- cluoma 6y agoWow this is great, thank you for the tip! My site uses SQLite3 for storage so this is perfect. I'm continually amazed at how featureful SQLite is.