Interface LexicalIndexJSON

A saved index: version 1.

interface LexicalIndexJSON {
    v: 1;
    k1: number;
    b: number;
    documents: [id: string, length: number, metadata?: Record<string, unknown>][];
    terms: [term: string, postings: [document: number, count: number][]][];
}

Properties

Properties

v: 1

The format's version.

k1: number

The index's term saturation.

b: number

The index's length normalization.

documents: [id: string, length: number, metadata?: Record<string, unknown>][]

Each document as its id, its length in tokens and its metadata.

terms: [term: string, postings: [document: number, count: number][]][]

Each term with its postings: a document's position in documents and the term's count in it.