======================================
MongoDB\\Collection::dropSearchIndex()
======================================

.. versionadded:: 1.17

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

Definition
----------

.. phpmethod:: MongoDB\Collection::dropSearchIndex()

   Drop an Atlas Search index for the collection.

   .. code-block:: php

      function dropSearchIndex(string $name, array $options = []): void

   .. include:: /includes/extracts/note-atlas-search-requirement.rst

Parameters
----------

``$name`` : string
  Name of the index to drop.

``$options`` : array
  An array specifying the desired options.

  .. list-table::
     :header-rows: 1
     :widths: 20 20 80

     * - Name
       - Type
       - Description

     * - comment
       - mixed
       - .. include:: /includes/extracts/common-option-comment.rst

Errors/Exceptions
-----------------

.. include:: /includes/extracts/error-unsupportedexception.rst
.. include:: /includes/extracts/error-invalidargumentexception.rst
.. include:: /includes/extracts/error-driver-runtimeexception.rst

See Also
--------

- :phpmethod:`MongoDB\Collection::createSearchIndex()`
- :phpmethod:`MongoDB\Collection::createSearchIndexes()`
- :phpmethod:`MongoDB\Collection::listSearchIndexes()`
- :phpmethod:`MongoDB\Collection::updateSearchIndex()`
- :manual:`dropSearchIndex </reference/command/dropSearchIndex>` command
  reference in the MongoDB manual
- `Atlas Search <https://www.mongodb.com/docs/atlas/atlas-search/>`__ documentation in the MongoDB Manual
