Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12724

Missing query plan bounds for 2d index explain

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6.0-rc1
    • Affects Version/s: 2.5.5
    • Component/s: Geo
    • None
    • Fully Compatible
    • ALL
    • Hide
      var houses = db.getSisterDB("2d").houses;
      houses.insert({
      	price_room: [10000, 3],
      	type: "house"
      });
      
      houses.ensureIndex({price_room: "2d"}, { min: 0, max: 200000});
      
      houses.find( { price_room :
      	{ $geoWithin : { 
      	   	$box : [ [ 2000 , 0 ] , [ 20000 , 100 ] ] 
      	  } 
      	} 
      }).explain(true);
      

      In 2.4 the indexBounds field is filled in. In 2.5.5, the indexBounds is an empty document.

      Show
      var houses = db.getSisterDB( "2d" ).houses; houses.insert({ price_room: [10000, 3], type: "house" }); houses.ensureIndex({price_room: "2d" }, { min: 0, max: 200000}); houses.find( { price_room : { $geoWithin : { $box : [ [ 2000 , 0 ] , [ 20000 , 100 ] ] } } }).explain( true ); In 2.4 the indexBounds field is filled in. In 2.5.5, the indexBounds is an empty document.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      When using the 2d index with custom min, max values query plan does not return when using explain although query is answered.

        1. server12774.js
          3 kB
          Benety Goh

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            christkv Christian Amor Kvalheim
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: