[SERVER-17854] Allow $or predicates to be indexed by partial indexes Created: 01/Apr/15 Updated: 05/Feb/16 Resolved: 23/Jun/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Quint Iteration 3.1.2, Quint Iteration 3, Quint Iteration 4, Quint Iteration 5 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The 3.1.1 version of partial indexes decides if a given query is compatible with a given partial index by checking if the query's root predicate describes a subset of the documents that the partial index document filter describes. However, this does not allow $or predicates to be indexed by partial indexes, as $or predicates are indexed by a union of scans on separate indexes. This would allow the following query to be answerable by a union of scans on the following two indexes:
|
| Comments |
| Comment by Githook User [ 23/Jun/15 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: Also replaces index_partial_queryplanner.js with unit test |