---
title: "💭 SQLite FTS5 Extension"
description: "!https://www.sqlite.org/fts5.html"
date: 2023-08-21
published: true
tags:
  - sqlite
  - data
  - database
  - thought
template: link
---


![https://www.sqlite.org/fts5.html](/static/https://www.sqlite.org/fts5.html)

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

These can be used with sqlite-utils.

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

And with the python api.

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




!!! note

    This post is a <a href="/thoughts/" class="wikilink" data-title="Thoughts" data-description="These are generally my thoughts on a web page or some sort of url, except a rare few don&#39;t have a link. These are dual published off of my..." data-date="2024-04-01">thought</a>. It's a short note that I make
    about someone else's content online <a href="/tags/thoughts/" class="hashtag-tag" data-tag="thoughts" data-count=2 data-reading-time=3 data-reading-time-text="3 minutes">#thoughts</a>
