Function addAllAsync

  • 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 index many documents, to avoid blocking the main thread. The indexing is performed asynchronously and in chunks.

    Type Parameters

    • Document

    • ID

    Parameters

    • searchIndex: SearchIndex<Document, ID>

      The search index

    • documents: readonly Document[]

      An array of documents to be indexed

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

      Configuration options

      • Optional chunkSize?: number

    Returns Promise<void>

    A promise resolving to undefined when the indexing is done

Generated using TypeDoc