Index api depending on ES version

Hi

We are using ES 5.1.1 and rsyslog+omelasticsearch (plugin to index into elastic) with docker containers.

When indexing events into Elasticsearch via Index API we're getting several warnings like:

[2016-12-15T12:35:27,844][WARN ][o.e.d.r.a.a.i.RestTypesExistsAction] [HEAD /{index}/{type}] is deprecated! Use [HEAD /{index}/_mapping/{type}]

Although I think I understand the message (ie: omelasticsearch is using a legacy format and should change the request to use _mapping) I was wondering how changing that will affect indexing into other/older ES versions.

Furthermore, even I'm able to query the ES version with

curl -XGET 'localhost:9200/?filter_path=version.number'

making above query+index won't solve the problem, cause each request could be done by different nodes within our cluster (ie: query version is answered by es_instance_1, while index is answered by es_instance_b)

Is there any way to use the correct syntax depending on the ES version considering we're using a cluster and each request can be sent to different nodes?
Is there a way to send a "index request with support for multiple es versions"?
Am I in the wrong way?

Regards

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.