You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/08/15 07:12:13 UTC
[GitHub] tonysun83 opened a new pull request #752: Fix incorrect indexable_fields for $in
tonysun83 opened a new pull request #752: Fix incorrect indexable_fields for $in
URL: https://github.com/apache/couchdb/pull/752
## Overview
The function indexable_fields/1 is supposed to remove extraneous fields
created by the mango_selector_text:convert/1 function so that indexes
will not be bypassed during index selection time. This wasn't working
as expected in the case of $in when the user did not explicitly specify
an array at index time. In fact, we had two different results depending
on whether or not users used all_fields or explicilty specified a
field. Before if you only specified {"name" : "age", "type : "number"}
as a field, you could not query for {"age" : {"$in" : [2, 3]}}. You
had to explicitly add {"name" : "age.[]", "type : "number"} to your
list of indexes so the $in would work. This fixes the scenario and now
should work as expected
## Testing recommendations
Automated Tests added
## GitHub issue number
Github Issue is this PR
- [X] Code is written and works correctly;
- [X] 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