b0wter opened a new issue #598:
URL: https://github.com/apache/couchdb-documentation/issues/598


   I am referencing [this 
part](https://docs.couchdb.org/en/latest/api/database/find.html#db-index) of 
the documentation.
   
   The _Example index creation using all available query parameters_ does not 
work for me. Posting it results in the following response:
   ```
   {
       "error": "missing_required_key",
       "reason": "Missing required key: index"
   }
   ```
   I've played around with it a little and found that:
   
   _The index object is a JSON array of field names following the sort syntax. 
Nested fields are also allowed, e.g. “person.name”._
   
   no longer (?) holds true. It has (at least) two possibles properties: 
`fields` and `partial_filter_selector`. `partial_filter_selector` is listed as 
a query parameter but it shouldn't be.
   
   
   An example using all available parameters looks like this:
   ```
   {
     "index": {
       "partial_filter_selector": {
         "year": {
           "$gt": 2010
         },
         "limit": 10,
         "skip": 0
       },
       "fields": [
         "_id",
         "_rev",
         "year",
         "title"
       ]
     },
     "ddoc": "example-ddoc",
     "name": "example-index",
     "type": "json",
     "partitioned": false
   }
   ```
   I am running containerized version of CouchDb 3.1.1. I think the 
documentation is out of date and would update it according to my findings. In 
case I've not just misunderstood the documentation 😅


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to