Tearleads

document_search_fts_word Client SQLite virtual table

Word index over document_search_content: an external-content FTS5 table keyed by search_rowid, tokenized with unicode61 (diacritics removed). It keeps no copy of the text. Search persistence writes it with each content row and rebuilds it when it is created over existing rows, such as after a local backup restore.

Declared in packages/client-sdk/src/data/sqlite/schema/documentSearchSchema.ts

Columns

  • titleuntyped
    • nullable

    Word index of the same-named document_search_content column. A match reads the text back from that table's row.

  • structured_textuntyped
    • nullable

    Word index of the same-named document_search_content column. A match reads the text back from that table's row.

  • attachment_textuntyped
    • nullable

    Word index of the same-named document_search_content column. A match reads the text back from that table's row.

  • body_textuntyped
    • nullable

    Word index of the same-named document_search_content column. A match reads the text back from that table's row.

DDL

The statement the client runs to create this index.

CREATE VIRTUAL TABLE IF NOT EXISTS "document_search_fts_word" USING fts5(
  title,
  structured_text,
  attachment_text,
  body_text,
  content='document_search_content',
  content_rowid='search_rowid',
  tokenize='unicode61 remove_diacritics 2'
);