I am trying to index shapefile into Elasticsearch. The geometry type is Multipolygon.
By following this blog post
With the GDAL (Geospatial Data Abstraction Library) command line tools, you can easily get your geo and map data into Elasticsearch without setting up Beats or Logstash. And once ingested, you can start using it to build multilayer map visualizations...
I try this cmd:
ogr2ogr -lco INDEX_NAME=test -lco NOT_ANALYZED_FIELDS={ALL} ES:http://localhost:9200 test.shp
However, I have got below errors.
ERROR 1: HTTP error code : 406
ERROR 1: {"error":"Content-Type header [application/x-javascript; charset=UTF-8] is not supported","status":406}
ERROR 1: Unable to write feature 0 from layer test.
ERROR 1: Terminating translation prematurely after failed
translation of layer test (use -skipfailures to skip errors)
Can anyone help on this?
Thanks
nickpeihl
(Nick Peihl)
June 1, 2020, 5:16pm
2
Hi @Scorpion21 . Which version of elasticsearch and which version of GDAL are you using?
The GDAL version can be found by running ogrinfo --version
.
nickpeihl:
ogrinfo --version
GDAL 2.3.3
Elasticsearch 7.6.2
nickpeihl
(Nick Peihl)
June 2, 2020, 7:07pm
4
Hi @Scorpion21 . GDAL 2.3.3 is not compatible with Elasticsearch 7+. You'll want to install GDAL 3.1.0 .
system
(system)
Closed
June 30, 2020, 7:07pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.