Hi, It seems that all examples about how to query ElasticSearch with GDAL in http://www.gdal.org/drv_elasticsearch.html are failing with ElasticSearch versions 2.x. Reason is the breaking change "A field can no longer be referenced using its short name. Instead, the full path to the field is required" as documented in https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking_20_mapping_changes.html
I am planning to update the documents but I would like to be sure that I have understood it right that: - GDAL creates an ElasticSearch index with the name = OGR layer name - That ES index has always _type named FeatureCollection - attributes of the source data are always within "properties" Therefore this ogrinfo -ro ES: my_type -where '{ "filter": { "term": { "EAS_ID": 168 } } }' must be used in this way with ES 2.x ogrinfo -ro ES: my_type -where '{ "filter": { "term": { "properties.EAS_ID": 168 } } }' similarly the Windows escaping example C:\GDAL_on_Windows>ogrinfo ES: my_type -where "{\"query\": { \"match\": { \"properties.NAME\": \"Helsinki\" } } }" Do you agree? -Jukka Rahkonen-
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev