6 ms·
It's a very useful feature of sqlite and it also works great in-browser using wa-sqlite[0]. Example, if anyone's curious [1]. [0]: https://github.com/rhashimot
by iansinnott 2y ago
It's a very useful feature of sqlite and it also works great in-browser using wa-sqlite[0]. Example, if anyone's curious [1].
[0]: https://github.com/rhashimoto/wa-sqlite https://github.com/rhashimoto/wa-sqlite
[1]: https://github.com/iansinnott/prompta/blob/master/src/lib/migrations/prompta_schema.sql#L54-L63 https://github.com/iansinnott/prompta/blob/master/src/lib/mi...
- jbaiter 2y agoI'd go as far as claiming that the WASM port of SQLite with FTS5 enabled makes SQLite the best general purpose client-side search engine currently on the market. And with the option to further customize it with custom tokenizers and auxilliary functions, you can do pretty advanced stuff with it, rivalling Lucene (not completely though, e.g. FTS5 does not store offsets, so highlighting is more expensive than in Lucene).
- ThatPlayer 2y agoI've been trying something similar, but using https://github.com/mmomtchev/sqlite-wasm-http https://github.com/mmomtchev/sqlite-wasm-http to stream the database over http for a SPA without a backend. It's actually able to do searches (for queries that aren't super short) without downloading the entire FTS table.
- iansinnott 2y agoInteresting, thanks for sharing. I didn't realize you could use search features when streaming the db over a network.