[gdal-dev] Question about ES SQL dialect

Even Rouault even.rouault at spatialys.com
Fri Oct 23 07:30:37 PDT 2015


Hi Jukka,

> 
> 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?

For -sql, you need to specify -dialect ES
For -where, there's no way in the API for specifying a dialect. So the driver 
sees if { is the first character, in which case it infers this is JSon filter.

> 
> Should ElasticSearch be included in the Non-OGR SQL section of
> http://www.gdal.org/ogr_sql.html?

Perhaps, although that when dealing with the particulars of each driver, the 
better reference is the doc page of the driver. This is kind of a hack of 
passing ES JSon filters in an interface called ExecuteSQL, so advertizing it in 
a generic page might bring more confusion to the general public.
I let the doc team do what they think is appropriate ;-)

> 
> -Jukka Rahkonen-
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list