Skip to content

Build your personal knowledge base with Trilium Notes

revert: remove FTS5 content search (no measured end-to-end improvement)

perfectra1n48dd93b94b87
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 5232fa1dc1..f9ba8f8743 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1294,8 +1294,7 @@
},
"search": {
"title": "Search",
- "enable_fuzzy_matching": "Enable fuzzy matching in search (matches similar words when exact matches are insufficient)",
- "enable_fts5": "Use content index for faster full-text search (applies on next search)"
+ "enable_fuzzy_matching": "Enable fuzzy matching in search (matches similar words when exact matches are insufficient)"
},
"search_engine": {
"title": "Search Engine",
diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsx
index c16fffc891..8cb99bace4 100644
--- a/apps/client/src/widgets/type_widgets/options/other.tsx
+++ b/apps/client/src/widgets/type_widgets/options/other.tsx
@@ -39,7 +39,6 @@ export default function OtherSettings() {
function SearchSettings() {
const [ fuzzyEnabled, setFuzzyEnabled ] = useTriliumOptionBool("searchEnableFuzzyMatching");
- const [ fts5Enabled, setFts5Enabled ] = useTriliumOptionBool("searchEnableFts5");
return (
<OptionsSection title={t("search.title")}>
@@ -49,12 +48,6 @@ function SearchSettings() {
currentValue={fuzzyEnabled}
onChange={setFuzzyEnabled}
/>
- <FormCheckbox
- name="search-fts5"
- label={t("search.enable_fts5")}
- currentValue={fts5Enabled}
- onChange={setFts5Enabled}
- />
</OptionsSection>
);
}
diff --git a/apps/server/spec/fts5_search.spec.ts b/apps/server/spec/fts5_search.spec.ts
deleted file mode 100644
index 7d6ed7483a..0000000000
--- a/apps/server/spec/fts5_search.spec.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { Application } from "express";
-import { beforeAll, describe, expect, it } from "vitest";
-import config from "../src/services/config.js";
-
-let app: Application;
-
-function timed<T>(fn: () => T): [T, number] {
- const start = performance.now();
- const result = fn();
- return [result, performance.now() - start];
-}
-
-describe("FTS5 Content Search (integration)", () => {
- beforeAll(async () => {
- config.General.noAuthentication = true;
- const buildApp = (await import("../src/app.js")).default;
- app = await buildApp();
- });
-
- it("FTS5 index builds and searches correctly", async () => {
- const sql = (await import("../src/services/sql.js")).default;
- const becca = (await import("../src/becca/becca.js")).default;
- const ftsIndex = (await import("../src/services/search/fts_index.js")).default;
- const cls = (await import("../src/services/cls.js")).default;
-
- await new Promise<void>((resolve) => {
- cls.init(() => {
- // Check if FTS table exists (migration may not have run on test DB)
- const tableExists = sql.getValue<number>(
- "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='note_content_fts'"
- );
-
- if (!tableExists) {
- // Create the table for testing
- sql.execute(`
- CREATE VIRTUAL TABLE IF NOT EXISTS note_content_fts USING fts5(
- noteId UNINDEXED,
- content,
- tokenize='unicode61 remove_diacritics 2'
- )
- `);
- }
-
- const noteCount = Object.keys(becca.notes).length;
- console.log(`\n Notes in becca: ${noteCount}`);
-
- // Build the index
- ftsIndex.resetIndex();
- const [, buildMs] = timed(() => ftsIndex.buildIndex());
- console.log(` FTS index build: ${buildMs.toFixed(0)}ms`);
-
- // Verify index has content
- const indexedCount = sql.getValue<number>("SELECT COUNT(*) FROM note_content_fts");
- console.log(` Notes indexed: ${indexedCount}`);
- expect(indexedCount).toBeGreaterThanOrEqual(0);
-
- // If we have indexed content, test search
- if (indexedCount > 0) {
- const [results, searchMs] = timed(() => ftsIndex.searchContent(["note"], "*=*"));
- console.log(` FTS search "note": ${searchMs.toFixed(1)}ms (${results.length} results)`);
- expect(results).toBeInstanceOf(Array);
- }
-
- // Test update and remove don't throw
- expect(() => ftsIndex.updateNote("nonexistent")).not.toThrow();
- expect(() => ftsIndex.removeNote("nonexistent")).not.toThrow();
-
- // Clean up
- sql.execute("DELETE FROM note_content_fts");
- ftsIndex.resetIndex();
-
- resolve();
- });
- });
- });
-});
diff --git a/apps/server/src/migrations/0235__add_fts5_content_search.ts b/apps/server/src/migrations/0235__add_fts5_content_search.ts
deleted file mode 100644
index d0767d51b4..0000000000
--- a/apps/server/src/migrations/0235__add_fts5_content_search.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import sql from "../services/sql.js";
-import log from "../services/log.js";
-
-export default () => {
- sql.execute(/*sql*/`
- CREATE VIRTUAL TABLE IF NOT EXISTS note_content_fts USING fts5(
- noteId UNINDEXED,
- content,
- tokenize='unicode61 remove_diacritics 2'
- )
- `);
-
- log.info("Created note_content_fts table. FTS index will be populated on first search.");
-};
diff --git a/apps/server/src/migrations/migrations.ts b/apps/server/src/migrations/migrations.ts
index e9f8b8d72d..7aca1f802b 100644
--- a/apps/server/src/migrations/migrations.ts
+++ b/apps/server/src/migrations/migrations.ts
@@ -6,11 +6,6 @@
// Migrations should be kept in descending order, so the latest migration is first.
const MIGRATIONS: (SqlMigration | JsMigration)[] = [
- // Add FTS5 virtual table for full-text content search
- {
- version: 235,
- module: async () => import("./0235__add_fts5_content_search.js")
- },
// Migrate aiChat notes to code notes since LLM integration has been removed
{
version: 234,
diff --git a/apps/server/src/routes/api/options.ts b/apps/server/src/routes/api/options.ts
index 5491fbf31e..049a898fca 100644
--- a/apps/server/src/routes/api/options.ts
+++ b/apps/server/src/routes/api/options.ts
@@ -98,7 +98,6 @@ const ALLOWED_OPTIONS = new Set<OptionNames>([
"backgroundEffects",
"allowedHtmlTags",
"searchEnableFuzzyMatching",
- "searchEnableFts5",
"redirectBareDomain",
"showLoginInShareTheme",
"splitEditorOrientation",
diff --git a/apps/server/src/services/handlers.ts b/apps/server/src/services/handlers.ts
index 89647d8d83..f32bf6ddd0 100644
--- a/apps/server/src/services/handlers.ts
+++ b/apps/server/src/services/handlers.ts
@@ -60,17 +60,6 @@ eventService.subscribe([eventService.ENTITY_CHANGED, eventService.ENTITY_DELETED
} else if (entityName === "notes") {
// ENTITY_DELETED won't trigger anything since all branches/attributes are already deleted at this point
runAttachedRelations(entity, "runOnNoteChange", entity);
-
- if (entity.isDeleted) {
- try {
- const ftsIndex = require("./search/fts_index.js").default;
- if (ftsIndex.isIndexBuilt()) {
- ftsIndex.removeNote(entity.noteId);
- }
- } catch {
- // FTS index update failure should not block note operations
- }
- }
}
});
@@ -92,16 +81,6 @@ eventService.subscribe(eventService.ENTITY_CHANGED, ({ entityName, entity }) =>
eventService.subscribe(eventService.NOTE_CONTENT_CHANGE, ({ entity }) => {
runAttachedRelations(entity, "runOnNoteContentChange", entity);
-
- // Update FTS content index incrementally
- try {
- const ftsIndex = require("./search/fts_index.js").default;
- if (ftsIndex.isIndexBuilt()) {
- ftsIndex.updateNote(entity.noteId);
- }
- } catch {
- // FTS index update failure should not block note saves
- }
});
eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) => {
diff --git a/apps/server/src/services/options_init.ts b/apps/server/src/services/options_init.ts
index de22bbaafd..17ea5a1f0b 100644
--- a/apps/server/src/services/options_init.ts
+++ b/apps/server/src/services/options_init.ts
@@ -200,7 +200,6 @@ const defaultOptions: DefaultOption[] = [
// Search settings
{ name: "searchEnableFuzzyMatching", value: "true", isSynced: true },
- { name: "searchEnableFts5", value: "true", isSynced: true },
// Share settings
{ name: "redirectBareDomain", value: "false", isSynced: true },
diff --git a/apps/server/src/services/search/expressions/note_content_fulltext.ts b/apps/server/src/services/search/expressions/note_content_fulltext.ts
index f2e0122d32..f3e0a39333 100644
--- a/apps/server/src/services/search/expressions/note_content_fulltext.ts
+++ b/apps/server/src/services/search/expressions/note_content_fulltext.ts
@@ -79,17 +79,7 @@ class NoteContentFulltextExp extends Expression {
const resultNoteSet = new NoteSet();
- // Try FTS5 index first for supported operators
- if (this.canUseFts()) {
- const ftsWorked = this.searchViaFts(inputNoteSet, resultNoteSet);
- if (ftsWorked) {
- this.searchFlatTextAttributes(inputNoteSet, resultNoteSet);
- return resultNoteSet;
- }
- // FTS unavailable or failed — fall through to sequential scan
- }
-
- // Fallback: sequential scan (original behavior)
+ // Search through notes with content
for (const row of sql.iterateRows<SearchRow>(`
SELECT noteId, type, mime, content, isProtected
FROM notes JOIN blobs USING (blobId)
@@ -99,91 +89,43 @@ class NoteContentFulltextExp extends Expression {
this.findInText(row, inputNoteSet, resultNoteSet);
}
- this.searchFlatTextAttributes(inputNoteSet, resultNoteSet);
- return resultNoteSet;
- }
-
- /**
- * Whether this operator can be served by FTS5.
- */
- private canUseFts(): boolean {
- try {
- const optionService = require("../../options.js").default;
- if (!optionService.getOptionBool("searchEnableFts5")) {
- return false;
- }
- } catch {
- // Option not available yet — allow FTS
- }
- return ["=", "!=", "*=*"].includes(this.operator);
- }
+ // For exact match with flatText, also search notes WITHOUT content (they may have matching attributes)
+ if (this.flatText && (this.operator === "=" || this.operator === "!=")) {
+ for (const note of inputNoteSet.notes) {
+ // Skip if already found or doesn't exist
+ if (resultNoteSet.hasNoteId(note.noteId) || !(note.noteId in becca.notes)) {
+ continue;
+ }
- /**
- * Attempts to use the FTS5 index for content search.
- * Returns true if FTS was used successfully, false to fall back to sequential scan.
- */
- private searchViaFts(inputNoteSet: NoteSet, resultNoteSet: NoteSet): boolean {
- try {
- const ftsIndex = require("../fts_index.js").default;
- const matchingNoteIds = ftsIndex.searchContent(this.tokens, this.operator);
-
- for (const noteId of matchingNoteIds) {
- if (inputNoteSet.hasNoteId(noteId) && noteId in becca.notes) {
- if (this.operator === "!=") {
- continue;
- }
- resultNoteSet.add(becca.notes[noteId]);
+ const noteFromBecca = becca.notes[note.noteId];
+ const flatText = noteFromBecca.getFlatText();
+
+ // For flatText, only check attribute values (format: #name=value or ~name=value)
+ // Don't match against noteId, type, mime, or title which are also in flatText
+ let matches = false;
+ const phrase = this.tokens.join(" ");
+ const normalizedPhrase = normalizeSearchText(phrase);
+ const normalizedFlatText = normalizeSearchText(flatText);
+
+ // Check if =phrase appears in flatText (indicates attribute value match)
+ // For single words, use word-boundary matching to avoid substring matches
+ if (!normalizedPhrase.includes(' ')) {
+ // Single word: look for =word with word boundaries
+ // Split by = to get attribute values, then check each value for exact word match
+ const parts = normalizedFlatText.split('=');
+ matches = parts.slice(1).some(part => this.exactWordMatch(normalizedPhrase, part));
+ } else {
+ // Multi-word phrase: check for substring match
+ matches = normalizedFlatText.includes(`=${normalizedPhrase}`);
}
- }
- if (this.operator === "!=") {
- const matchingSet = new Set(matchingNoteIds);
- for (const note of inputNoteSet.notes) {
- if (!matchingSet.has(note.noteId) && note.noteId in becca.notes) {
- resultNoteSet.add(becca.notes[note.noteId]);
- }
+ if ((this.operator === "=" && matches) || (this.operator === "!=" && !matches)) {
+ resultNoteSet.add(noteFromBecca);
}
}
-
- return true;
- } catch {
- return false;
- }
- }
-
- /**
- * Searches flat text attributes for = and != operators.
- * Extracted from the old execute() tail.
- */
- private searchFlatTextAttributes(inputNoteSet: NoteSet, resultNoteSet: NoteSet): void {
- if (!this.flatText || (this.operator !== "=" && this.operator !== "!=")) {
- return;
}
- for (const note of inputNoteSet.notes) {
- if (resultNoteSet.hasNoteId(note.noteId) || !(note.noteId in becca.notes)) {
- continue;
- }
-
- const noteFromBecca = becca.notes[note.noteId];
- const flatText = noteFromBecca.getFlatText();
-
- let matches = false;
- const phrase = this.tokens.join(" ");
- const normalizedPhrase = normalizeSearchText(phrase);
- const normalizedFlatText = normalizeSearchText(flatText);
-
- if (!normalizedPhrase.includes(' ')) {
- const parts = normalizedFlatText.split('=');
- matches = parts.slice(1).some(part => this.exactWordMatch(normalizedPhrase, part));
- } else {
- matches = normalizedFlatText.includes(`=${normalizedPhrase}`);
- }
-
- if ((this.operator === "=" && matches) || (this.operator === "!=" && !matches)) {
- resultNoteSet.add(noteFromBecca);
- }
- }
+ return resultNoteSet;
}
/**
diff --git a/apps/server/src/services/search/fts_index.spec.ts b/apps/server/src/services/search/fts_index.spec.ts
deleted file mode 100644
index 983c972a0b..0000000000
--- a/apps/server/src/services/search/fts_index.spec.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { describe, it, expect } from "vitest";
-
-describe("FTS Index Service", () => {
- it("should export buildIndex, updateNote, removeNote, searchContent functions", async () => {
- const ftsIndex = await import("./fts_index.js");
- expect(typeof ftsIndex.default.buildIndex).toBe("function");
- expect(typeof ftsIndex.default.updateNote).toBe("function");
- expect(typeof ftsIndex.default.removeNote).toBe("function");
- expect(typeof ftsIndex.default.searchContent).toBe("function");
- expect(typeof ftsIndex.default.isIndexBuilt).toBe("function");
- expect(typeof ftsIndex.default.resetIndex).toBe("function");
- });
-});
diff --git a/apps/server/src/services/search/fts_index.ts b/apps/server/src/services/search/fts_index.ts
deleted file mode 100644
index 30359f7d19..0000000000
--- a/apps/server/src/services/search/fts_index.ts
+++ /dev/null
@@ -1,182 +0,0 @@
-"use strict";
-
-import sql from "../sql.js";
-import log from "../log.js";
-import protectedSessionService from "../protected_session.js";
-import preprocessContent from "./expressions/note_content_fulltext_preprocessor.js";
-
-interface ContentRow {
- noteId: string;
- type: string;
- mime: string;
- content: string | Buffer | null;
- isProtected: number;
- isDeleted: number;
-}
-
-const MAX_CONTENT_SIZE = 2 * 1024 * 1024;
-
-let indexBuilt = false;
-
-function prepareContent(row: ContentRow): string | null {
- if (!row.content) return null;
- if (row.isDeleted) return null;
-
- let content: string | undefined;
-
- if (row.isProtected) {
- if (!protectedSessionService.isProtectedSessionAvailable()) {
- return null;
- }
- try {
- content = protectedSessionService.decryptString(row.content as string) || undefined;
- } catch {
- return null;
- }
- } else {
- content = typeof row.content === "string" ? row.content : row.content.toString();
- }
-
- if (!content || content.length > MAX_CONTENT_SIZE) return null;
-
- try {
- content = preprocessContent(content, row.type, row.mime);
- } catch {
- return null;
- }
-
- return content || null;
-}
-
-function ftsTableExists(): boolean {
- try {
- const result = sql.getValue<number>(
- "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='note_content_fts'"
- );
- return result > 0;
- } catch {
- return false;
- }
-}
-
-function buildIndex(): void {
- if (!ftsTableExists()) {
- log.info("FTS5 table does not exist, skipping index build.");
- return;
- }
-
- const startTime = Date.now();
- log.info("Building FTS content index...");
-
- sql.execute("DELETE FROM note_content_fts");
-
- // Collect all rows first, then batch-insert in a transaction.
- // iterateRows() holds an open cursor that conflicts with writes on the same connection.
- const prepared: { noteId: string; content: string }[] = [];
-
- for (const row of sql.iterateRows<ContentRow>(`
- SELECT noteId, type, mime, content, isProtected, isDeleted
- FROM notes JOIN blobs USING (blobId)
- WHERE type IN ('text', 'code', 'mermaid', 'canvas', 'mindMap')
- AND isDeleted = 0
- AND content IS NOT NULL
- AND LENGTH(content) < ${MAX_CONTENT_SIZE}
- `)) {
- const processedContent = prepareContent(row);
- if (processedContent) {
- prepared.push({ noteId: row.noteId, content: processedContent });
- }
- }
-
- const count = sql.transactional(() => {
- for (const { noteId, content } of prepared) {
- sql.execute(
- "INSERT INTO note_content_fts (noteId, content) VALUES (?, ?)",
- [noteId, content]
- );
- }
- return prepared.length;
- });
-
- const elapsed = Date.now() - startTime;
- log.info(`FTS content index built: ${count} notes indexed in ${elapsed}ms`);
- indexBuilt = true;
-}
-
-function updateNote(noteId: string): void {
- if (!indexBuilt || !ftsTableExists()) return;
-
- sql.execute("DELETE FROM note_content_fts WHERE noteId = ?", [noteId]);
-
- const row = sql.getRowOrNull<ContentRow>(`
- SELECT noteId, type, mime, content, isProtected, isDeleted
- FROM notes JOIN blobs USING (blobId)
- WHERE noteId = ?
- `, [noteId]);
-
- if (!row) return;
-
- const processedContent = prepareContent(row);
- if (processedContent) {
- sql.execute(
- "INSERT INTO note_content_fts (noteId, content) VALUES (?, ?)",
- [row.noteId, processedContent]
- );
- }
-}
-
-function removeNote(noteId: string): void {
- if (!indexBuilt || !ftsTableExists()) return;
- sql.execute("DELETE FROM note_content_fts WHERE noteId = ?", [noteId]);
-}
-
-function searchContent(tokens: string[], operator: string = "*=*"): string[] {
- if (!ftsTableExists()) return [];
-
- if (!indexBuilt) {
- buildIndex();
- }
-
- const escapedTokens = tokens.map(t => {
- const cleaned = t.replace(/["*^(){}:]/g, "");
- if (!cleaned) return null;
- return `"${cleaned}"`;
- }).filter(Boolean);
-
- if (escapedTokens.length === 0) return [];
-
- let ftsQuery: string;
- if (operator === "=") {
- ftsQuery = escapedTokens.join(" ");
- } else {
- ftsQuery = escapedTokens.join(" AND ");
- }
-
- try {
- const results = sql.getColumn<string>(
- "SELECT noteId FROM note_content_fts WHERE note_content_fts MATCH ? ORDER BY rank",
- [ftsQuery]
- );
- return results;
- } catch (e) {
- log.info(`FTS5 query failed for "${ftsQuery}": ${e}`);
- return [];
- }
-}
-
-function isIndexBuilt(): boolean {
- return indexBuilt;
-}
-
-function resetIndex(): void {
- indexBuilt = false;
-}
-
-export default {
- buildIndex,
- updateNote,
- removeNote,
- searchContent,
- isIndexBuilt,
- resetIndex
-};
diff --git a/docs/search-performance-benchmarks.md b/docs/search-performance-benchmarks.md
index bb7411230c..614abfb917 100644
--- a/docs/search-performance-benchmarks.md
+++ b/docs/search-performance-benchmarks.md
@@ -382,84 +382,3 @@ Side-by-side comparison across all note counts for the most common query pattern
- Some individual data points show slight regressions at 5K scale (+2-8%), likely noise from shared-machine benchmarking
- Long queries (4 tokens) at 5K notes show a small regression (+18%), but this evens out at 10K
- The new flat text index has a one-time build cost on first search (~62ms at 10K notes), amortized across all subsequent searches
-
----
-
-## FTS5 Content Index Benchmarks
-
-> These benchmarks use the **real SQLite database** with actual blob content (not monkeypatched). They test the `fastSearch=false` path that users hit when pressing Enter in search or using saved searches. This is the path that was taking **seconds** in production.
-
-### The Architecture
-
-When `fastSearch=false`, the expression tree is `OrExp([NoteFlatTextExp, NoteContentFulltextExp])`. Both expressions run:
-- **NoteFlatTextExp**: In-memory scan of titles/attributes (fast — 5-25ms)
-- **NoteContentFulltextExp**: Scans ALL note content from SQLite blobs (slow — the bottleneck)
-
-FTS5 replaces the sequential blob scan in `NoteContentFulltextExp` with an indexed FTS5 MATCH query.
-
-### FTS5 Query-Only Performance (isolating the content scan)
-
-This measures just the content search portion, stripped of the expression tree, scoring, and snippet extraction overhead.
-
-| Notes | FTS5 MATCH query | Sequential SQL scan | FTS5 Speedup |
-|------:|-----------------:|--------------------:|-------------:|
-| 1,000 | **0.2ms** | 3.6ms | **15x** |
-| 5,000 | **0.5ms** | 16.0ms | **33x** |
-| 10,000 | **1.1ms** | 36.4ms | **32x** |
-
-FTS5 is **15-33x faster** than the sequential scan for the raw content query.
-
-### Why Full Search Doesn't Show the Same Speedup
-
-When measured end-to-end through `findResultsWithQuery()` with `fastSearch=false`:
-
-| Notes | Query | FTS5 | Sequential | Speedup |
-|------:|:------|-----:|-----------:|--------:|
-| 1,000 | `"performance"` | 52.1ms | 48.3ms | 0.9x |
-| 5,000 | `"performance"` | 233.4ms | 227.6ms | 1.0x |
-| 10,000 | `"performance"` | 517.3ms | 515.9ms | 1.0x |
-| 1,000 | `"xyznonexistent"` | 46.2ms | 57.6ms | 1.2x |
-| 5,000 | `"xyznonexistent"` | 272.9ms | 229.3ms | 0.8x |
-| 10,000 | `"xyznonexistent"` | 460.3ms | 468.3ms | 1.0x |
-
-The FTS5 query itself is 32x faster, but it's **drowned out by the rest of the pipeline**:
-
-| Component | Time at 10K notes | % of total |
-|:----------|------------------:|-----------:|
-| `NoteFlatTextExp` (in-memory scan) | ~25ms | ~5% |
-| `NoteContentFulltextExp` content scan | 1-36ms | ~1-7% |
-| Scoring (`computeScore` per result) | ~100-200ms | ~20-40% |
-| Snippet extraction | ~50-100ms | ~10-20% |
-| Highlighting | ~50ms | ~10% |
-| `searchPathTowardsRoot` recursion | ~100-200ms | ~20-40% |
-
-The content scan (which FTS5 replaces) is only **1-7% of total search time** in this benchmark. The real bottleneck at this scale is scoring, snippet extraction, and the recursive parent-path walk — all JavaScript operations that FTS5 doesn't affect.
-
-### Where FTS5 Will Matter Most
-
-FTS5 will show significant real-world improvement when:
-1. **Database is large (50K-200K+ notes)** — The sequential scan reads every blob from disk. At 200K notes with varying content sizes, the I/O cost dominates. FTS5 eliminates this entirely.
-2. **Notes have large content** — The benchmark uses 300-word notes (~2KB each). Real notes can be 10KB-100KB+. The sequential scan reads and preprocesses ALL of that content; FTS5 returns noteIds without touching content blobs.
-3. **Disk is slow** — These benchmarks run on fast local SSD. On slower storage (network drives, spinning disks, Docker volumes), the I/O savings from FTS5 will be dramatic.
-
-### FTS5 Index Build Cost
-
-| Notes | Build time | Notes indexed |
-|------:|-----------:|--------------:|
-| 1,000 | 213ms | 1,015 |
-| 5,000 | 943ms | 5,015 |
-| 10,000 | 2,720ms | 10,015 |
-
-The index builds lazily on first search and is maintained incrementally via `NOTE_CONTENT_CHANGE` events. Users using `unicode61` tokenizer (not trigram) keeps the index compact.
-
-### Reference: Autocomplete (fastSearch=true) — Not Affected by FTS5
-
-For comparison, the in-memory autocomplete path remains fast:
-
-| Notes | `"performance"` | `"performance optimization"` |
-|------:|-----------------:|-----------------------------:|
-| 1,000 | 5.2ms | 1.4ms |
-| 5,000 | 10.1ms | 3.7ms |
-| 10,000 | 24.4ms | 10.4ms |
-
-These don't use FTS5 at all — they use the `NoteFlatTextExp` in-memory path optimized by the earlier commits in this PR.
diff --git a/packages/commons/src/lib/options_interface.ts b/packages/commons/src/lib/options_interface.ts
index 555fd20a5b..6e36ebd7a3 100644
--- a/packages/commons/src/lib/options_interface.ts
+++ b/packages/commons/src/lib/options_interface.ts
@@ -137,8 +137,6 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
// Search settings
/** Whether fuzzy matching is enabled in search (matches similar words when exact matches are insufficient). */
searchEnableFuzzyMatching: boolean;
- /** Whether to use FTS5 index for content search (faster but requires index build). */
- searchEnableFts5: boolean;
// Share settings
redirectBareDomain: boolean;