!!! note This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process here

Here's my thought on 💭 SQLite FTS5 Extension


sqlite has 3 different tokenizers, porter, ascii, trigram.

These can be used with sqlite-utils.


sqlite-utils enable-fts --tokenize porter database.db post title message tags

And with the python api.


db = Database('database.db')
db["post"].enable_fts(
                ["title", "message", "tags"], create_triggers=True, tokenize="trigram"
            )
posts = list(db["post"].search(search))

This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts