@resistdesign/voltra
    Preparing search index...

    Type Alias FullTextDocumentWriterDependencies

    Storage operations required by the generic full-text document mutation strategy. Drivers own only these persistence operations.

    type FullTextDocumentWriterDependencies = {
        applyDocumentMutation(
            docId: DocId,
            indexField: string,
            mutation: FullTextDocumentMutation,
        ): Promise<void>;
        loadDocumentArtifacts?(
            docId: DocId,
            indexField: string,
            candidates: { exactTokens: string[]; lossyTokens: string[] },
        ): Promise<FullTextDocumentState>;
        loadDocumentContent(
            docId: DocId,
            indexField: string,
        ): Promise<string | undefined>;
    }
    Index

    Methods

    • Inspect persisted artifacts when no mirror exists.

      The candidate sets are derived by the generic strategy from previous and next document content so a driver can perform bounded reads.

      Parameters

      • docId: DocId
      • indexField: string
      • candidates: { exactTokens: string[]; lossyTokens: string[] }

      Returns Promise<FullTextDocumentState>

    • Read normalized persisted mirror content when available.

      Parameters

      • docId: DocId
      • indexField: string

      Returns Promise<string | undefined>