1.5.7. /{db}/_design/{ddoc}/_nouveau/{index} — Apache CouchDB® 3.5 Documentation

# 1.5.7. `/{db}/_design/{ddoc}/_nouveau/{index}`

Warning

Nouveau is an experimental feature. Future releases might change how the endpoints work and might invalidate existing indexes.

Warning

Nouveau endpoints require a running nouveau server. See Nouveau Server Installation for details.

Added in version 3.4.0.

GET /{db}/_design/{ddoc}/_nouveau/{index}

  Executes a nouveau request against the named index in the specified design document.

  Parameters:

    - db – Database name

    - ddoc – Design document name

    - index – Nouveau index name

  Request Headers:

    - Accept –

      - application/json

  Query Parameters:

    - bookmark (string) – A bookmark received from a previous search. This parameter enables paging through the results. If there are no more results after the bookmark, you get a response with an empty rows array and the same bookmark, confirming the end of the result list.

    - counts (json) – An array of names of string fields for which counts are requested. The response contains counts for each unique value of this field name among the documents that match the search query.

    - include_docs (boolean) – Include the full content of the documents in the response.

    - locale (string) – The (Java) locale used to parse numbers in range queries. Defaults to the JDK default locale if not specified. Some examples are `de` , `us`, `gb`.

    - limit (number) – Limit the number of the returned documents to the specified number.

    - q (string) – Required. The Lucene query string.

    - ranges (json) – This field defines ranges for numeric search fields. The value is a JSON object where the fields names are numeric search fields, and the values of the fields are arrays of JSON objects. The objects must have a `label`, `min` and `max` value (of type string, number, number respectively), and optional `min_inclusive` and `max_inclusive` properties (defaulting to `true` if not specified). Example: `{"bar":[{"label":"cheap","min":0,"max":100}]}`

    - sort (json) – Specifies the sort order of the results. The default sort order is relevance. A JSON string of the form `"fieldname"` or `"-fieldname"` for descending order, where fieldname is the name of a string or double field. You can use a single string to sort by one field or an array of strings to sort by several fields in the same order as the array. Some examples are `"relevance"`, `"bar"`, `"-foo"` and [`"-foo"`, `"bar"`].

    - top_n (number) – Limit the number of facets returned by group, defaulting to 10 with a maximum of 1000.

    - update (boolean) – Set to `false` to allow the use of an out-of-date index.

  Response Headers:

    - Content-Type –

      - application/json

    - Transfer-Encoding – `chunked`

  Response JSON Object:

    - hits (array) – Array of search hits. By default the information returned contains only the document ID and revision.

    - total_hits (number) – Number of matches for the query.

    - total_hits_relation (string) – `EQUAL_TO` if `total_hits` is exact. `GREATER_THAN_OR_EQUAL_TO` if not.

    - bookmark (string) – Opaque identifier to enable pagination.

  Status Codes:

    - 200 OK – Request completed successfully

    - 400 Bad Request – Invalid request

    - 401 Unauthorized – Read permission required

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

    - 404 Not Found – Specified database, design document or view is missed

Note

Faceting is not supported on partitioned searches, so the following query parameters should not be used on those requests: `counts` and `ranges`.

See also

For more information about how nouveau works, see the Nouveau User Guide.

# 1.5.8. `/{db}/_design/{ddoc}/_nouveau_info/{index}`

Warning

Nouveau is an experimental feature. Future releases might change how the endpoints work and might invalidate existing indexes.

Warning

Nouveau endpoints require a running nouveau server. See Nouveau Server Installation for details.

Added in version 3.4.0.

GET /{db}/_design/{ddoc}/_nouveau_info/{index}
  Parameters:

    - db – Database name

    - ddoc – Design document name

    - index – Search index name

  Status Codes:

    - 200 OK – Request completed successfully

    - 400 Bad Request – Request body is wrong (malformed or missing one of the mandatory fields)

    - 401 Unauthorized – Unauthorized request to a protected API

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

    - 500 Internal Server Error – A server error (or other kind of error) occurred

Request:

    GET /recipes/_design/cookbook/_nouveau_info/ingredients HTTP/1.1
    Accept: application/json
    Host: localhost:5984

Response:

    HTTP/1.1 200 OK
    Content-Type: application/json

    {
        "name": "_design/cookbook/ingredients",
        "search_index": {
            "num_docs": 1000,
            "update_seq": 5000,
            "disk_size": 1048576
        }
    }