@grepvine/sdk
    Preparing search index...

    Type Alias QueryResult

    One match, or several matches that share lines, together with the lines it covers. A result covers one line unless the query set multiline and a match spans lines.

    type QueryResult = {
        key: string;
        last_line_number: number;
        line_end_offset: number;
        line_number: number;
        line_start_offset: number;
        lines_after?: ContextLine[];
        lines_before?: ContextLine[];
        matches: Match[];
        matches_truncated: boolean;
        revision: string;
        text: string;
        text_line_number: number;
        text_start_offset: number;
        text_truncated: boolean;
    }
    Index
    key: string
    last_line_number: number

    One-based number of the last line the result covers. Equal to line_number unless a match spans lines.

    line_end_offset: number

    Byte offset just past the last covered line, excluding its line break.

    line_number: number

    One-based number of the first line the result covers.

    line_start_offset: number

    Byte offset of the first covered line's start within the document.

    lines_after?: ContextLine[]

    The requested lines after the result, in document order, starting at the line just below its last line. Fewer are returned at the end of the document, and the field is omitted when there are none.

    lines_before?: ContextLine[]

    The requested lines before the result, in document order, ending at the line just above its first line. Fewer are returned at the start of the document, and the field is omitted when there are none.

    matches: Match[]

    Every match on the covered lines that lies at least partly within text, with byte offsets and lengths relative to the document. A match that consumed the last line's break extends one byte past text.

    matches_truncated: boolean

    Whether matches were left out, because there were more than 4096 or because they lie outside text.

    revision: string
    text: string

    The covered lines, up to 64 KiB, centered on the first match when they are longer. Line breaks between covered lines are kept; the last line's break is not.

    text_line_number: number

    One-based number of the line text begins on. Equal to line_number unless text was cut at its start.

    text_start_offset: number

    Byte offset of the first byte of text within the document.

    text_truncated: boolean

    Whether text was cut at either end.