don't require scan and order when sort spec can have only one value

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Incomplete
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.f.drop()
      true
      > db.f.ensureIndex( {a:1,b:1} );
      > db.f.find( {a:[1,2],b:1} ).sort( {b:1} ).explain()
      {
      	"cursor" : "BtreeCursor a_1_b_1 multi",
      	"nscanned" : 0,
      	"nscannedObjects" : 0,
      	"n" : 0,
      	"scanAndOrder" : true,
      	"millis" : 4,
      	"indexBounds" : [
      		[
      			{
      				"a" : 1,
      				"b" : 1
      			},
      			{
      				"a" : 1,
      				"b" : 1
      			}
      		],
      		[
      			{
      				"a" : [
      					1,
      					2
      				],
      				"b" : 1
      			},
      			{
      				"a" : [
      					1,
      					2
      				],
      				"b" : 1
      			}
      		]
      	]
      }
      > 
      

            Assignee:
            David Storch
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: