[SERVER-18800] Expand support for $in queries to be answered by partial index Created: 03/Jun/15  Updated: 02/Aug/18  Resolved: 10/Jun/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

A partial index with a filter {a: {$gt: 5}} should be able to answer the following queries

{a: {$in: [5.1, 6]}}
{a: {$in: [7, 8, 9]}}

but not

{a: {$in: [5]}}
{a: {$in: [3, 4.9]}}
{a: {$in: [null]}}

because each element in the $in array is greater than the value of the ComparisonMatchExpression. This applies to partial index filters involving $eq, $gt, $gte, $lt, and $lte.



 Comments   
Comment by Githook User [ 10/Jun/15 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-18800 Expand support for $in queries with partial indexes.
Branch: master
https://github.com/mongodb/mongo/commit/cb0ca493d59ef8a06fd3f8fdfcb47e7bddcb2d1d

Generated at Thu Feb 08 03:48:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.