nono opened a new pull request #1011: Allow to use $or with a mango JSON index
URL: https://github.com/apache/couchdb/pull/1011
 
 
   ## Overview
   
   Since #816, mango JSON index on compound fields can be selected only if the 
selector make sure that all the fields listed in the index are always present. 
This commit add a special case where all clauses of an `$or` can ensure that a 
field is present.
   
   For instance, if I had an index:
   
   ```
   [A, B]
   ```
   
   is_usable would now return true for the selector:
   
   ```json
   {
     "A": "foo",
     "$or": {
       "B": "bar",
       "B": "baz"
     }
   }
   ```
   
   ## Testing recommendations
   
   Run the mango test suite. Manually run some mango queries with/without JSON 
indexes and check that the results are as expected.
   
   ## Related Issues or Pull Requests
   
   - #816
   
   ## Checklist
   
   - [ ] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to