mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 14:39:34 +01:00
core: remove porter tokenizer for stemming
it didn't work very well. It was stemming things like "one" into "on"
This commit is contained in:
@@ -386,6 +386,9 @@ export class NNMigrationProvider implements MigrationProvider {
|
|||||||
async up() {}
|
async up() {}
|
||||||
},
|
},
|
||||||
"a-2025-05-17": {
|
"a-2025-05-17": {
|
||||||
|
async up() {}
|
||||||
|
},
|
||||||
|
"a-2025-06-04": {
|
||||||
async up(db) {
|
async up(db) {
|
||||||
await runFTSTablesMigrations(db);
|
await runFTSTablesMigrations(db);
|
||||||
}
|
}
|
||||||
@@ -459,7 +462,7 @@ async function runFTSTablesMigrations(db: Kysely<any>) {
|
|||||||
|
|
||||||
await createFTS5Table("notes_fts", [{ name: "id" }, { name: "title" }], {
|
await createFTS5Table("notes_fts", [{ name: "id" }, { name: "title" }], {
|
||||||
contentTable: "notes",
|
contentTable: "notes",
|
||||||
tokenizer: ["porter", "better_trigram", "remove_diacritics 1"]
|
tokenizer: ["better_trigram", "remove_diacritics 1"]
|
||||||
}).execute(tx);
|
}).execute(tx);
|
||||||
|
|
||||||
await createFTS5Table(
|
await createFTS5Table(
|
||||||
@@ -467,7 +470,7 @@ async function runFTSTablesMigrations(db: Kysely<any>) {
|
|||||||
[{ name: "id" }, { name: "noteId" }, { name: "data" }],
|
[{ name: "id" }, { name: "noteId" }, { name: "data" }],
|
||||||
{
|
{
|
||||||
contentTable: "content",
|
contentTable: "content",
|
||||||
tokenizer: ["html", "porter", "better_trigram", "remove_diacritics 1"]
|
tokenizer: ["html", "better_trigram", "remove_diacritics 1"]
|
||||||
}
|
}
|
||||||
).execute(tx);
|
).execute(tx);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user