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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.1.1
    • 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();

    Description

      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
      }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: