# Why does some fields names in Elasticsearch's API output have \`\_\` in them

**URL:** <https://discuss.elastic.co/t/why-does-some-fields-names-in-elasticsearchs-api-output-have-in-them/209157>\
**Category:** Elasticsearch\
**Created:** [November 23, 2019, 4:44pm UTC](https://discuss.elastic.co/t/why-does-some-fields-names-in-elasticsearchs-api-output-have-in-them/209157 "2019-11-23T16:44:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![viveksinghggits](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/viveksinghggits/32/49997_2.png) [@viveksinghggits](https://discuss.elastic.co/u/viveksinghggits)\
**Post date:** [November 23, 2019, 4:44pm UTC](https://discuss.elastic.co/t/why-does-some-fields-names-in-elasticsearchs-api-output-have-in-them/209157/1 "2019-11-23T16:44:02Z")

</div>

If we take a look into the output of some of the APIs especially of `search` and run below command for a particular `index` let's say `twitter`

```auto
curl <host-ip>:9200/twitter/_search/pretty

```

below is response that we get

```auto
{
  "took" : 4,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 0,
    "max_score" : null,
    "hits" : []
  }
}

```

my question here is why do we have an `_` in shards field name and make it `_shards`. If that is the way people decided to go why don't we have have `_` in `took`, `timed_out` and `hits`.

---

<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:** [December 21, 2019, 4:44pm UTC](https://discuss.elastic.co/t/why-does-some-fields-names-in-elasticsearchs-api-output-have-in-them/209157/2 "2019-12-21T16:44:10Z")

</div>

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