@resistdesign/voltra
    Preparing search index...

    Class LossyIndex

    In-memory lossy index for token postings.

    Index

    Methods

    • Add a document by inserting postings for each unique token.

      Parameters

      • docId: DocId

        Document id to add.

      • indexField: string

        Field name the tokens are indexed under.

      • tokens: string[]

        Token list for the document.

      Returns void

      Nothing.

    • Add a posting for a token.

      Parameters

      • token: string

        Token value to add.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id containing the token.

      Returns void

      Nothing.

    • Remove a posting for a token.

      Parameters

      • token: string

        Token value to remove.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id containing the token.

      Returns void

      Nothing.