# How to get only the '\_source' part of the hits. of the result

**URL:** <https://discuss.elastic.co/t/how-to-get-only-the-source-part-of-the-hits-of-the-result/232662>\
**Category:** Kibana\
**Created:** [May 14, 2020, 1:57pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-source-part-of-the-hits-of-the-result/232662 "2020-05-14T13:57:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muna](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@Muna](https://discuss.elastic.co/u/Muna)\
**Post date:** [May 14, 2020, 1:57pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-source-part-of-the-hits-of-the-result/232662/1 "2020-05-14T13:57:04Z")

</div>

is there any way to get only the '\_source' part of the result of the query .

Like from below result i want only the source part from the hits.

{  
"took" : 0,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"skipped" : 0,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [  
{  
"\_index" : "abc",  
"\_type" : "abc",  
"\_id" : "13",  
"\_score" : 1.0,  
"\_source" : {  
"abc":125  
}  
}  
]  
}  
}

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [June 4, 2020, 10:24pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-source-part-of-the-hits-of-the-result/232662/2 "2020-06-04T22:24:27Z")

</div>

@Muna You can add a filter\_path query param, e.g.

```auto
GET /kibana_sample_data_ecommerce/_search?filter_path=hits.hits._source
{
  "query": {
    "match_all": {}
  },
  "size": 10
}

```

Returns:

 ![Screen Shot 2020-06-04 at 15.24.03](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bfce66d92c52f122993bb6fd08b7e091dd71dd73.png)

---

<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:** [July 2, 2020, 10:24pm UTC](https://discuss.elastic.co/t/how-to-get-only-the-source-part-of-the-hits-of-the-result/232662/3 "2020-07-02T22:24:38Z")

</div>

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