# How to remove specific response body content in Elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-remove-specific-response-body-content-in-elasticsearch/125319>\
**Category:** Elasticsearch\
**Created:** [March 23, 2018, 7:42am UTC](https://discuss.elastic.co/t/how-to-remove-specific-response-body-content-in-elasticsearch/125319 "2018-03-23T07:42:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muthu\_kutty](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@muthu\_kutty](https://discuss.elastic.co/u/muthu_kutty)\
**Post date:** [March 23, 2018, 7:42am UTC](https://discuss.elastic.co/t/how-to-remove-specific-response-body-content-in-elasticsearch/125319/1 "2018-03-23T07:42:22Z")

</div>

My response body from Elasticsearch is

```
{
  "took": 67,
  "timed_out": false,
  "_shards": {
    "total": 331,
    "successful": 331,
    "skipped": 321,
    "failed": 0
  },
  "hits": {
    "total": 5344,
    "max_score": 4.2037153,
    "hits": [
      {
        "_index": "Test-2018.03.22",
        "_type": "Emp",
        "_id": "df4354yy5465645tytryytI",
        "_score": 4.2037153,
        "_source": {
          "time": "2018-03-22T12:46:39.6259805Z",
          "Sample": "Info",
          "Active": "Avaliable",
          "ProcessCheck1": "0",
          "ProgramId2": "0",
        }
      },
      ]
      }
      }

```

Is there a way to remove them so i can have the following structure,

```
{

  "hits": {
    "total": 5344,
    "hits": [
      {
        "_source": {
          "time": "2018-03-22T12:46:39.6259805Z",
          "Sample": "Info",
        }
      },
      ]
      }
      }
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 23, 2018, 7:53am UTC](https://discuss.elastic.co/t/how-to-remove-specific-response-body-content-in-elasticsearch/125319/2 "2018-03-23T07:53:39Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

Anyway, read [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-source-filtering.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-source-filtering.html)

---

<div class="post-metadata">

**Author:** ![muthu\_kutty](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@muthu\_kutty](https://discuss.elastic.co/u/muthu_kutty)\
**Post date:** [March 23, 2018, 8:33am UTC](https://discuss.elastic.co/t/how-to-remove-specific-response-body-content-in-elasticsearch/125319/3 "2018-03-23T08:33:13Z")

</div>

Thanks for u'r information dadoonetDavid,

i have Edited...

---

<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:** [April 20, 2018, 8:33am UTC](https://discuss.elastic.co/t/how-to-remove-specific-response-body-content-in-elasticsearch/125319/4 "2018-04-20T08:33:15Z")

</div>

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