# Deprecated field \[\_routing\] used, expected \[routing\] instead

**URL:** <https://discuss.elastic.co/t/deprecated-field-routing-used-expected-routing-instead/115951>\
**Category:** Elasticsearch\
**Created:** [January 17, 2018, 10:06pm UTC](https://discuss.elastic.co/t/deprecated-field-routing-used-expected-routing-instead/115951 "2018-01-17T22:06:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jjk/32/26684_2.png) [@JJK](https://discuss.elastic.co/u/JJK)\
**Post date:** [January 17, 2018, 10:06pm UTC](https://discuss.elastic.co/t/deprecated-field-routing-used-expected-routing-instead/115951/1 "2018-01-17T22:06:49Z")

</div>

Getting the following warning with 6.1.2:

`[WARN][org.elasticsearch.deprecation.common.ParseField] Deprecated field [_routing] used, expected [routing] instead`

But the docs still show that `_routing` is correct?  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.1/mapping-routing-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/mapping-routing-field.html)

I'm not sure where this field name needs to be adjusted...

---

<div class="post-metadata">

**Author:** ![JJK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jjk/32/26684_2.png) [@JJK](https://discuss.elastic.co/u/JJK)\
**Post date:** [January 18, 2018, 3:06am UTC](https://discuss.elastic.co/t/deprecated-field-routing-used-expected-routing-instead/115951/2 "2018-01-18T03:06:33Z")

</div>

A little more info on how this is being sent:

```
POST _bulk
{ "index" : { "_id" : 23, "_routing" : 4 } }
```

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 18, 2018, 4:19am UTC](https://discuss.elastic.co/t/deprecated-field-routing-used-expected-routing-instead/115951/3 "2018-01-18T04:19:17Z")

</div>

The correct link you're looking for is this one: [https://www.elastic.co/guide/en/elasticsearch/reference/6.1/docs-bulk.html#bulk-routing](https://www.elastic.co/guide/en/elasticsearch/reference/6.1/docs-bulk.html#bulk-routing)

Just use `routing` instead of `_routing` in your bulk call and you'll be fine

```
POST _bulk
{ "index" : { "_id" : 23, "routing" : 4 } }
                           ^
                           |
                   remove underscore
```

---

<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:** [February 15, 2018, 4:19am UTC](https://discuss.elastic.co/t/deprecated-field-routing-used-expected-routing-instead/115951/4 "2018-02-15T04:19:19Z")

</div>

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