[gdal-dev] Elasticsearch arrays

Lewis Clark lclark at genasys.com
Tue Sep 29 00:26:08 PDT 2020


In my Elasticsearch index I have an array of locations that I can't seem to access with OGR.

In the following example I can see my geopoint "lkl" but not "locations.geometry".
Anything I'm missing here?

{
   "_index":"targets",
   "_type":"_doc",
   "_id":"uVIWaHQBsLn3fGwYUuv-",
   "_version":7,
   "_score":1,
   "_source":{
      "number":"123456778",
      "email":"xxx at yyy.com<mailto:xxx at yyy.com>",
      "lkl":"-37.81288283067835,144.96384429905447",
      "locations":[
         {
            "name":"Home",
            "geometry":"-37.81288283067835,144.96384429905447",
            "id":1,
         },
         {
            "name":"Work",
            "geometry":"-37.96492031820528,144.7073221201426",
            "id":2,
         }
      ],

      "id":"uVIWaHQBsLn3fGwYUuv-"
   }
}

ogrinfo  ES:http://localhost:9200 -sql 'select * from targets'

OGRFeature(targets):1
  _id (String) = uVIWaHQBsLn3fGwYUuv-
  email (String) = xxx at yyy.com<mailto:xxx at yyy.com>
  number (String) = 123456778
 lkl = POINT (144.963844299054 -37.8128828306783)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200929/370c34ea/attachment.html>


More information about the gdal-dev mailing list