[SERVER-4677] index ranges for overlapping prefix regular expressions in a $in clause Created: 13/Jan/12  Updated: 11/Jul/16  Resolved: 19/Jan/12

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

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Aaron Staple
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

In some cases overlapping ranges of prefix regular expressions in a $in clause are not computed correctly:

> c.find( {x:{$in:[/^a/,/^ab/]}} ).explain()
{
"cursor" : "BtreeCursor x_1 multi",
"nscanned" : 0,
"nscannedObjects" : 0,
"n" : 0,
"millis" : 1,
"nYields" : 0,
"nChunkSkips" : 0,
"isMultiKey" : false,
"indexOnly" : false,
"indexBounds" :

{ "x" : [ [ "a", "ac" ], [ /^a/, /^a/ ], [ /^ab/, /^ab/ ] ] }

,
"server" : "Aaron-Staples-MacBook-Pro.local:27017"
}



 Comments   
Comment by auto [ 19/Jan/12 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4677 correctly calculate union of overlapping ranges, and refactor range union code
Branch: master
https://github.com/mongodb/mongo/commit/6f6f131a3e86b8e84f269dab40bc152106d83eed

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