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

Missing query plan bounds for 2d index explain

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.6.0-rc1
    • 2.5.5
    • 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.

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: