@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias SearchDocument

    The text a table's free-text q is matched against. A searched table holds it in a STORED search_document column (searchDocumentColumn) with a GIN index on that column (searchIndex), and names it with projectedDocument. Admin-only parts live in a second column, search_document_admin, which a table's *AdminSearch names beside it. searchDocument spells the expression inline instead, for a view arm with no base table to read it from.

    type SearchDocument = {
        columns: readonly [SQL | Column, ...(SQL | Column)[]];
        name?: SQL | Column;
        projected?: true;
    }
    Index
    columns: readonly [SQL | Column, ...(SQL | Column)[]]
    name?: SQL | Column

    The row's display name, set by named: a one-letter q matches its start.

    projected?: true

    Set by projectedDocument: each column already holds a document.