@yoch/frozenminisearch v1.3.0
    Preparing search index...

    Class FrozenIndexBuilder<T>

    Incremental builder for FrozenMiniSearch without materializing a full documents[] array.

    Type Parameters

    • T
    Index

    Constructors

    Accessors

    Methods

    • Adds all the given documents to the index asynchronously.

      Returns a promise that resolves (to undefined) when the indexing is done. This method is useful when indexing many documents, to avoid blocking the main thread. The indexing is performed asynchronously and in chunks. Finalize with freezeFrozenIndexBuilder when done.

      Parameters

      • documents: readonly T[]

        An array of documents to be indexed

      • options: { chunkSize?: number } = {}

        Configuration options

      Returns Promise<void>

      A promise resolving to undefined when the indexing is done