Briyah SDK - v2.0.18
    Preparing search index...

    Interface DocumentHit

    One passage a search found.

    interface DocumentHit {
        documentId: string;
        excerpt: string;
        heading?: string;
        name: string;
        pageNum: number;
        score: number;
    }
    Index
    documentId: string
    excerpt: string

    The passage. Briyah trims it to fit the result; send it whole.

    heading?: string

    The headings above the passage, when the host knows them.

    name: string

    The document's name, so a hit can be cited without another call.

    pageNum: number
    score: number

    Higher is better. Hits from different sources are merged by it, so a host with more than one source should keep scores on a common scale.