-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Feature] Use trigram index for session search on SQLite #8285
Copy link
Copy link
Open
Labels
FeatureNew feature or requestNew feature or requestP2-mediumPriority: bug with workaround, important feature requestPriority: bug with workaround, important feature requestcomp:dbDatabase, persistence, and migrationsDatabase, persistence, and migrationscomp:reprComponent: serialization, representation layerComponent: serialization, representation layerhelp wantedExtra attention is neededExtra attention is neededtriagedIssue has been triaged by the botIssue has been triaged by the bot
Description
Activity
Metadata
Metadata
Assignees
Labels
FeatureNew feature or requestNew feature or requestP2-mediumPriority: bug with workaround, important feature requestPriority: bug with workaround, important feature requestcomp:dbDatabase, persistence, and migrationsDatabase, persistence, and migrationscomp:reprComponent: serialization, representation layerComponent: serialization, representation layerhelp wantedExtra attention is neededExtra attention is neededtriagedIssue has been triaged by the botIssue has been triaged by the bot
Problem or use case
Text search on SQLite on omnigent reads every message on every search and uses a LIKE query so it gets slower as history grows.
On Postgres this is already fixed by using a trigram index (#4502), SQLite can have support for this too.
Proposed solution
Add an FTS5 trigram index on SQLite 3.34+.
Alternatives considered
The existing
conversation_items_ftstable uses a word tokenizer, so it can't match substrings (andboxinsandbox).