core: use porter trigram tokenizer for fts

This commit is contained in:
Abdullah Atta
2023-11-22 08:48:32 +05:00
parent 2f62c72cfe
commit 6b6e903322

View File

@@ -289,7 +289,9 @@ async function createFTS5Table(
const new_indexed_cols = sql.raw(indexedColumns.join(", new."));
const old_indexed_cols = sql.raw(indexedColumns.join(", old."));
await sql`CREATE VIRTUAL TABLE ${ref_fts} USING fts5(
id UNINDEXED, ${unindexed_cols} ${indexed_cols}, content='${sql.raw(table)}'
id UNINDEXED, ${unindexed_cols} ${indexed_cols}, content='${sql.raw(
table
)}', tokenize='porter trigram'
)`.execute(db);
insertConditions = [
"(new.deleted is null or new.deleted == 0)",