Function loadJSONIndexAsync

Async equivalent of loadJSONIndex

This function is an alternative to loadJSONIndex that returns a promise, and loads the index in batches, leaving pauses between them to avoid blocking the main thread. It tends to be slower than the synchronous version, but does not block the main thread, so it can be a better choice when deserializing very large indexes.

  • Type Parameters

    • ID

      The id type of the documents being indexed.

    • Document

      The type of the documents being indexed.

    • Index extends Record<string, any> = Record<never, never>

      The type of the documents being indexed.

    Parameters

    Returns Promise<SearchIndex<ID, Document, Index>>

    A Promise that will resolve to an instance of MiniSearch deserialized from the given JSON.