@resistdesign/voltra
    Preparing search index...

    Type Alias ExactWriter

    Writer interface for exact token positions.

    type ExactWriter = {
        addExactPositions(
            token: string,
            indexField: string,
            docId: DocId,
            positions: number[],
        ): Promise<void>;
        removeExactPositions(
            token: string,
            indexField: string,
            docId: DocId,
        ): Promise<void>;
    }
    Index

    Methods

    • Add exact token positions for a document.

      Parameters

      • token: string

        Token to add.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id to associate.

      • positions: number[]

        Token positions within the document.

      Returns Promise<void>

      Promise resolved when positions are written.

    • Remove exact token positions for a document.

      Parameters

      • token: string

        Token to remove.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id to disassociate.

      Returns Promise<void>

      Promise resolved when positions are removed.