# Get hits in kibana plugins(or change size)

**URL:** <https://discuss.elastic.co/t/get-hits-in-kibana-plugins-or-change-size/86780>\
**Category:** Kibana\
**Created:** [May 23, 2017, 8:24am UTC](https://discuss.elastic.co/t/get-hits-in-kibana-plugins-or-change-size/86780 "2017-05-23T08:24:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![echoLee](https://avatars.discourse-cdn.com/v4/letter/e/ecc23a/32.png) [@echoLee](https://discuss.elastic.co/u/echoLee)\
**Post date:** [May 23, 2017, 8:24am UTC](https://discuss.elastic.co/t/get-hits-in-kibana-plugins-or-change-size/86780/1 "2017-05-23T08:24:30Z")

</div>

I want to get hits in kibana plugin(not app), I found that the request in plugins set size:0 as default, but I need source data from hits when responses.

**Request payload:**  
`{"index":"test","ignore_unavailable":true,"preference":1495521687225} {"size":0,"query":{"bool":{"must":[{"query_string":{"analyze_wildcard":true,"query":"*"}},{"range":{"date":{"gte":1479883289714,"lte":1495521689714,"format":"epoch_millis"}}}],"must_not":[]}},"_source":{"excludes":[]},"aggs":{"1":{"terms":{"field":"gender.keyword","size":8,"order":{"_count":"desc"}}}}}`

**Response:**  
`hits:{total: 8, max_score: 0, hits: []} hits:[] //I want to get this with source max_score:0 total:8 status:200 timed_out:false took:10`

So how can I get 'hits' or maybe I can modify the size value in the code ? Thanks.

---

<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:** [June 20, 2017, 8:24am UTC](https://discuss.elastic.co/t/get-hits-in-kibana-plugins-or-change-size/86780/2 "2017-06-20T08:24:45Z")

</div>

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