@resistdesign/voltra
    Preparing search index...

    Class FullTextDdbBackend

    Read/write DynamoDB backend that adds query helpers to FullTextDdbWriter.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Add exact token positions for a document.

      Parameters

      • token: string

        Token value to store positions for.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id containing the token.

      • positions: number[]

        Token positions within the document.

      Returns Promise<void>

      Promise resolved once positions are stored.

    • Add a lossy 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 Promise<void>

      Promise resolved once posting is added.

    • Build a token stats write request for a document frequency delta.

      Parameters

      • token: string

        Token value to update stats for.

      • indexField: string

        Field name the token was indexed under.

      • delta: number

        Delta to apply to document frequency.

      Returns Promise<TableWrite | undefined>

      Write request or undefined when no update is needed.

    • Check whether a document contains a token.

      Parameters

      • docId: DocId

        Document id to check.

      • indexField: string

        Field name the token was indexed under.

      • token: string

        Token value to check.

      Returns Promise<boolean>

      True when the document contains the token.

    • Load exact positions for a token in a document.

      Parameters

      • token: string

        Token value to load positions for.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id containing the token.

      Returns Promise<number[] | undefined>

      Positions array or undefined when missing.

    • Load all lossy postings for a token.

      Parameters

      • token: string

        Token value to load postings for.

      • indexField: string

        Field name the token was indexed under.

      Returns Promise<DocId[]>

      Document ids containing the token.

    • Load token stats for a token.

      Parameters

      • token: string

        Token value to load stats for.

      • indexField: string

        Field name the token was indexed under.

      Returns Promise<TokenStats | undefined>

      Token stats or undefined when missing.

    • Query a page of lossy postings for a token.

      Parameters

      • token: string

        Token value to query postings for.

      • indexField: string

        Field name the token was indexed under.

      • options: LossyPostingsPageOptions = {}

        Paging options for the query.

      Returns Promise<LossyPostingsPage>

      Postings page with optional cursor.

    • Remove exact token positions for a document.

      Parameters

      • token: string

        Token value to remove positions for.

      • indexField: string

        Field name the token was indexed under.

      • docId: DocId

        Document id containing the token.

      Returns Promise<void>

      Promise resolved once positions are removed.

    • Remove a lossy 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 Promise<void>

      Promise resolved once posting is removed.

    • Write a document to lossy/exact postings and token stats tables.

      Parameters

      • document: DocumentRecord

        Document record to index.

      • primaryField: string

        Field name used as the document id.

      • indexField: string

        Field name containing the text to index.

      Returns Promise<void>

      Promise resolved once all writes complete.