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 2018/01/08 13:54:15 UTC

[GitHub] willholley opened a new pull request #1098: Mango: fallback to "selector" on empty "partian_filter_selector"

willholley opened a new pull request #1098: Mango: fallback to "selector" on empty "partian_filter_selector"
URL: https://github.com/apache/couchdb/pull/1098
 
 
   ## Overview
   
   Mango text indexes historically supported partial indexes
   defined via a "selector" field. This was renamed to
   "partial_filter_selector" in b98de40 but the fallback
   code did not correctly handle the case where
   a "selector" existed alongside a "partial_filter_selector".
   
   This situation can occur when a the _index endpoint is
   used to create a text index with a "selector". The resulting
   design document contains an empty "partial_filter_selector"
   field *and* the "selector" field that was passed in. The
   previous implementation of the fallback would detect the
   presence of "partial_filter_selector" and use the empty
   value (match all docs) instead of faling back to the
   "selector" field.
   
   This commit changes the behaviour so that a "selector"
   will be used even if an empty "partial_filter_selector"
   is present. A secondary fix would be to change the index
   creation so that we never use "selector" in the underlying
   index design document, even if it is passed to the _index
   API.
   
   ## Testing recommendations
   
   Run the test suite (with text indexes enabled). Attempt to create text indexes using the _index endpoint, specifying a "selector" field. Test that the partial index contains only the documents that match the selector.
   
   ## Related Issues or Pull Requests
   
   #818 
   
   ## 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:
users@infra.apache.org


With regards,
Apache Git Services