When performing an explain("executionStats") on a $near query, the searchIntervals field should contain all of the annuluses which are scanned. However, when a query is done with a limit, like the following:
db.geo.find({loc: { $near: {$geometry: {type: "Point", coordinates: [ 10.000329670329670329, 10.0009890109890109888 ] } } } } ).limit(50).explain("executionStats")
The number of searchIntervals on the GEO_NEAR_2DSPHERE stage is one less than it should be. It should equal the number of inputStages.
The reason this occurs is because in near.cpp, the method NearStage::advanceNext will only add to the intervalStats when the current buffer is finished. The limit will end early, before the buffer finishes. Therefore, the annulus will never be reported.