You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/04/30 20:56:41 UTC

[GitHub] [couchdb] roedoejet edited a comment on issue #2856: $or and $in operators do not seem to be using indices

roedoejet edited a comment on issue #2856:
URL: https://github.com/apache/couchdb/issues/2856#issuecomment-622107054


   > An $or operator also can't always use an index unless both sides of the $or have the same fields.
   
   Unless I'm misunderstanding something, I thought that's what I tried with `$or`:
   
   ```json
   {
      "selector": {
         "$or": [
            {
               "input.root": "aimer"
            },
            {
               "input.root": "etre"
            }
         ],
         "input.agent": {
            "$in": [
               "2-sg",
               "1-sg"
            ]
         },
         "input.option": {
            "$in": [
               "conditionnel-present",
               "indicatif-present"
            ]
         }
      }
   }
   ```
   
   But the same thing happens, it appears to be searching through each record:
   
   ![image](https://user-images.githubusercontent.com/14815080/80758249-40101e80-8aea-11ea-90a7-21ebc6a5b740.png)
   


----------------------------------------------------------------
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:
users@infra.apache.org