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

InternalError when using geoNear $meta projections with non-geo data

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.1.1
    • Component/s: Geo, Querying
    • ALL
    • Hide
      var t = db.geo_meta_projection;
      t.drop();
      
      t.insert({}); // ensure the namespace exists
      
      t.find({}, {a: {$meta: 'geoNearDistance'}}).toArray();
      t.find({}, {a: {$meta: 'geoNearPoint'}}).toArray();
      
      Show
      var t = db.geo_meta_projection; t.drop(); t.insert({}); // ensure the namespace exists t.find({}, {a: {$meta: 'geoNearDistance'}}).toArray(); t.find({}, {a: {$meta: 'geoNearPoint'}}).toArray();

      The $meta projection operator supports two (undocumented) values for geo queries: geoNearDistance and geoNearPoint

      These projection values trigger InternalErrors when used with non-geo data.

      Versions affected: 2.6.0+

      > t.find({}, {a: {$meta: 'geoNearDistance'}}).toArray();
      2015-04-07T18:47:49.196-0400 E QUERY    Error: error: {
      	"$err" : "Executor error: InternalError near loc dist requested but no data available",
      	"code" : 17144
      }
      
      > t.find({}, {a: {$meta: 'geoNearPoint'}}).toArray();
      2015-04-07T18:48:18.455-0400 E QUERY    Error: error: {
      	"$err" : "Executor error: InternalError near loc proj requested but no data available",
      	"code" : 17144
      }
      

            Assignee:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Reporter:
            kamran.khan Kamran K.
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: