Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
ManifoldCF 2.9
-
None
-
elasticsearch 6.0.1
Description
Getting error when trying to index documents into elasticsearch
Content-Type header [application/x-www-form-urlencoded] is not supported
Elasticsearch requires strict content type for rest requests
https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests
this was fixed by changing the
apache-manifoldcf-2.9/connectors/elasticsearch/connector/src/main/java/org/apache/manifoldcf/agents/output/elasticsearch file
ElasticSearchIndex.java: return new BasicHeader("Content-type","application/x-www-form-urlencoded");
to
ElasticSearchIndex.java: return new BasicHeader("Content-type","application/json");