enquire-mcp API reference - v4.0.0-rc.7
    Preparing search index...

    Interface FtsSearchHit

    A single hit from FtsIndex.search. snippet carries the FTS5 snippet(...) output (matched terms wrapped in «»).

    interface FtsSearchHit {
        chunk_index: number;
        kind: ChunkKind;
        line_end: number;
        line_start: number;
        rel_path: string;
        score: number;
        snippet: string;
    }
    Index
    chunk_index: number

    0-based chunk position within the source.

    kind: ChunkKind

    v2.8.0 — content-source kind. Defaults to "md" for backward compat.

    line_end: number

    1-based ending line in the source (inclusive).

    line_start: number

    1-based starting line in the source.

    rel_path: string

    Vault-relative path of the source note / PDF.

    score: number

    Flipped BM25 score — higher = better (the underlying FTS5 score is negative; we negate so callers can sort descending).

    v7 — exactly 0 is a SENTINEL, not a measurement: it marks a hit found only through the identifier-parts pass ("found, not ranked"). Those hits are appended after every ranked hit, so ordering by score keeps them last; do not read a 0 as "BM25 scored this at zero", and do not filter on score > 0 unless dropping parts-only recall is intended.

    snippet: string

    Excerpt with matched tokens wrapped in «» and truncation markers.

    v7 caveat — the markers are present only when the query term occurs in the excerpted text. A hit reached through the identifier-parts pass is excerpted from that chunk's content COPY while the term that matched lives in the parts column, so such a snippet is a plain excerpt with no «». Verified against SQLite: snippet() marks nothing when the match is in an unexcerpted column.