# 1.3.17. `/{db}/_search_cleanup`

POST /{db}/_search_cleanup

  Requests deletion of unreachable search (Clouseau) indexes of the specified database. The signatures for all current design documents is retrieved and any index found on disk with a signature that is not in that list is deleted.

  Parameters:

    - db – Database name

  Request Headers:

    - Accept –

      - application/json

      - text/plain

    - Content-Type – application/json

  Response Headers:

    - Content-Type –

      - application/json

      - text/plain; charset=utf-8

  Response JSON Object:

    - ok (boolean) – Operation status

  Status Codes:

    - 202 Accepted – Cleanup request has been accepted

    - 400 Bad Request – Invalid database name

    - 401 Unauthorized – CouchDB Server Administrator privileges required

    - 403 Forbidden – Insufficient permissions / Too many requests with invalid credentials

  Request:

      POST /db/_search_cleanup HTTP/1.1
      Accept: application/json
      Content-Type: application/json
      Host: localhost:5984

  Response:

      HTTP/1.1 202 Accepted
      Cache-Control: must-revalidate
      Content-Length: 12
      Content-Type: application/json
      Server: CouchDB (Erlang/OTP)

      {
          "ok": true
      }

# 1.3.18. `/{db}/_nouveau_cleanup`

POST /{db}/_nouveau_cleanup

  Requests deletion of unreachable search (Nouveau) indexes of the specified database. The signatures for all current design documents is retrieved and any index found on disk with a signature that is not in that list is deleted.

  Parameters:

    - db – Database name

  Request Headers:

    - Accept –

      - application/json

      - text/plain

    - Content-Type – application/json

  Response Headers:

    - Content-Type –

      - application/json

      - text/plain; charset=utf-8

  Response JSON Object:

    - ok (boolean) – Operation status

  Status Codes:

    - 202 Accepted – Cleanup request has been accepted

    - 400 Bad Request – Invalid database name

    - 401 Unauthorized – CouchDB Server Administrator privileges required

    - 403 Forbidden – Insufficient permissions / Too many requests with invalid credentials

  Request:

      POST /db/_nouveau_cleanup HTTP/1.1
      Accept: application/json
      Content-Type: application/json
      Host: localhost:5984

  Response:

      HTTP/1.1 202 Accepted
      Cache-Control: must-revalidate
      Content-Length: 12
      Content-Type: application/json
      Server: CouchDB (Erlang/OTP)

      {
          "ok": true
      }