[gdal-dev] Question about ES SQL dialect
Jukka Rahkonen
jukka.rahkonen at maanmittauslaitos.fi
Fri Oct 23 07:13:38 PDT 2015
Jukka Rahkonen <jukka.rahkonen <at> maanmittauslaitos.fi> writes:
>
> Hi,
>
> I am reading the ElasticSearch manual page
> http://www.gdal.org/drv_elasticsearch.html and I wonder what does this mean
> for an end user of ogrinfo and ogr2ogr
>
> "If specifying "ES" as the dialect of ExecuteSQL(), a JSon string with a
> serialized Elastic Search filter can be passed"
>
> Are ogrinfo and ogr2ogr analyzing automatically without any user input what
> is coming after "-where" or "-sql" and if it is json then it will be
passed on?
>
> Should ElasticSearch be included in the Non-OGR SQL section of
> http://www.gdal.org/ogr_sql.html?
I have learned that users should know about the existence of the ES SQL
dialect if they want to use ES filters inside GDAL VRT data source. This VTR
works fine for me, notice the use of <SrcSQL dialect="ES">
<OGRVRTDataSource>
<OGRVRTLayer name="ES_with_filter">
<SrcDataSource>ES:http://localhost:9200 allcountries</SrcDataSource>
<SrcSQL dialect="ES">
{
"query": {
"geo_shape": {
"geometry": {
"shape": {
"type": "envelope",
"coordinates": [[14, 52],[14.1, 52.2]]
}
}
}
}
}
</SrcSQL>
</OGRVRTLayer>
</OGRVRTDataSource>
-Jukka Rahkonen-
More information about the gdal-dev
mailing list