# Index api depending on ES version

**URL:** <https://discuss.elastic.co/t/index-api-depending-on-es-version/69690>\
**Category:** Elasticsearch\
**Created:** [December 21, 2016, 5:55pm UTC](https://discuss.elastic.co/t/index-api-depending-on-es-version/69690 "2016-12-21T17:55:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mostolog](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@mostolog](https://discuss.elastic.co/u/mostolog)\
**Post date:** [December 21, 2016, 5:55pm UTC](https://discuss.elastic.co/t/index-api-depending-on-es-version/69690/1 "2016-12-21T17:55:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 18, 2017, 5:55pm UTC](https://discuss.elastic.co/t/index-api-depending-on-es-version/69690/2 "2017-01-18T17:55:35Z")

</div>

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