Interface FuzzyHit

A document a search found.

interface FuzzyHit {
    id: string;
    score: number;
    fields: Record<string, Marked | Marked[]>;
    passages: Marked[];
}

Properties

Properties

id: string

The document's id.

score: number

For each query word, its best match's kind times the weight of the field it is in, summed.

fields: Record<string, Marked | Marked[]>

Each field the document holds, a text or a list of texts, with the words the query matched marked.

passages: Marked[]

Up to passages sentences or lines of the passage fields that hold a match, in the order of the text, each clipped around its first match; or, when only another field matched, the opening of the text, unmarked.