Function removeAll

Removes all the given documents from the index. If called with no arguments, it removes all documents from the index.

  • 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

    • searchIndex: SearchIndex<ID, Document, Index>

      The search index

    • Optionaldocuments: readonly Document[]

      The documents to be removed. If this argument is omitted, all documents are removed. Note that, for removing all documents, it is more efficient to call this method with no arguments than to pass all documents.

    Returns void