oliverdain opened a new issue #2124: Query says it's not using an index when it 
is.
URL: https://github.com/apache/couchdb/issues/2124
 
 
   ## Description
   
   If I run the following query it clearly is using the _id index/btree (you 
can tell by how fast it runs and `explain` shows it's using `_all_docs` with 
the correct `start_key` and `end_key`):
   
   ```
   {
      "selector": {
         "$and": [
            {
               "_id": {
                  "$gt": "bar"
               }
            },
            {
               "_id": {
                  "$lt": "foo"
               }
            }
         ]
      }
   }
   ```
   
   
   But when I run it I get "warning": "no matching index found, create an index 
to optimize query time". `"use_index": "_all_docs"` did not make it go away.
   
   ## Steps to Reproduce
   
   Hit the `_find` endpoint with that selector and request `execution_stats`.
   
   ## Expected Behaviour
   
   No warning.
   
   ## Your Environment
   
   * CouchDB Version used: 2.3.0
   * Operating System and version: Linux (Docker container)
   
   

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


With regards,
Apache Git Services

Reply via email to