#6724 closed enhancement (fixed)
ElasticSearch 5.0 not compatible of current OGR ES driver
Reported by: | Even Rouault | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.0 |
Component: | OGR_SF | Version: | 2.1.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
A number of REST API changes:
- creating a mapping requires a PUT ( https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html ) whereas it required before a POST ( https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-create-index.html )
Quick fix/workaround
Index: ogr/ogrsf_frmts/elastic/ogrelasticdatasource.cpp =================================================================== --- ogr/ogrsf_frmts/elastic/ogrelasticdatasource.cpp (révision 36400) +++ ogr/ogrsf_frmts/elastic/ogrelasticdatasource.cpp (copie de travail) @@ -495,6 +495,7 @@ bool bRet = true; char** papszOptions = NULL; papszOptions = CSLAddNameValue(papszOptions, "POSTFIELDS", data.c_str()); + papszOptions = CSLAddNameValue(papszOptions, "CUSTOMREQUEST", "PUT"); papszOptions = CSLAddNameValue(papszOptions, "HEADERS", "Content-Type: application/x-javascript; charset=UTF-8");
- unidentified changes in scrolling API that cause (on ne_10m_admin_0_countries imported) :
ERROR 1: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request _search/scroll contains unrecognized parameter: [size]"}],"type":"illegal_argument_exception","reason":"request _search/scroll contains unrecognized parameter: [size]"},"status":400}
Change History (2)
comment:1 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 8 years ago
Milestone: | → 2.2.0 |
---|---|
Type: | defect → enhancement |
Note:
See TracTickets
for help on using tickets.
In 36733: