Function discardAll

Discards the documents with the given IDs, so they won't appear in search results

It is equivalent to calling discard for all the given IDs, but with the optimization of triggering at most one automatic vacuuming at the end.

Note: to remove all documents from the index, it is faster and more convenient to call removeAll with no argument, instead of passing all IDs to this method.

  • 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 void