glynnbird commented on issue #327:
URL: https://github.com/apache/couchdb-nano/issues/327#issuecomment-1477551025

   This is not a Nano issue but I'll advise you anyway :)
   
   Your design document is creating an index on three things:
   
   - `fullname`
   - `username`
   - `_id`
   
   So a query involving _all three_ items will hit the index, or hitting the 
_first two_ and sorted by the second will work:
   
   ```js
   {
      "selector": {
         "fullname": "fullnameofdoctor",
         "username": "usernameofdoctor"
      },
      "sort": [
         "_id"
      ]
   }
   ```
   
   
   If you only want to query on `fullname` then change your index to only index 
`fullname`.


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to