# Display Top 'N' results in Kibana search

**URL:** https://discuss.elastic.co/t/display-top-n-results-in-kibana-search/51530
**Category:** Kibana
**Created:** [June 1, 2016, 8:58am UTC](https://discuss.elastic.co/t/display-top-n-results-in-kibana-search/51530 "2016-06-01T08:58:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)
#### Post date: [June 1, 2016, 8:58am UTC](https://discuss.elastic.co/t/display-top-n-results-in-kibana-search/51530/1 "2016-06-01T08:58:40Z")

</div>

Hi,  
Is there any way to display Top 'N' (where N is integer) search results in Kibana Discover (Search). Like how we specify **"size": 20** while querying Elastic Search. Currently if we specify "size" in the filter, the following warning is displayed on the dashboard.

![](https://us1.discourse-cdn.com/elastic/original/2X/d/d854d83b85308a54e8ce224d5646d2463f497cec.png)

Please let me know whether this is possible or not.

Thanks,  
RK

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [June 2, 2016, 8:17pm UTC](https://discuss.elastic.co/t/display-top-n-results-in-kibana-search/51530/2 "2016-06-02T20:17:53Z")

</div>

Hi,

You can use JSON in the Kibana search bar. I found it described here;

> **[Elasticsearch/Kibana Queries - In Depth Tutorial](https://www.timroes.de/2016/05/29/elasticsearch-kibana-queries-in-depth-tutorial/#using-json-in-the-kibana-search)**
>
> This tutorial explains how to write and understand Kibana and Elasticsearch queries
> in depth and how the mapping of Elastichsearch influences these queries.

It's probably documented other places but that's the first place I saw. So you may be able to put the proper JSON in the search to use the "size" option.

Or, you can set the "discover:sampleSize " down from 500 to some smaller number in Settings \> Advanced, but that changes it for everyone using Kibana.

But I think both of these would just return some sampling of that size. Not necessarily the "Top" results. If you want the data and not a chart, you might want to try a Data Table visualization. There you could do a Significant Terms aggregation and set your size.

---

<div class="post-metadata">

### Author: ![ramkchirra](https://avatars.discourse-cdn.com/v4/letter/r/ea666f/32.png) [@ramkchirra](https://discuss.elastic.co/u/ramkchirra)
#### Post date: [June 13, 2016, 10:43am UTC](https://discuss.elastic.co/t/display-top-n-results-in-kibana-search/51530/3 "2016-06-13T10:43:09Z")

</div>

Thanks for the reply:slight\_smile:

---

<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 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/display-top-n-results-in-kibana-search/51530/4 "2017-07-06T13:50:43Z")

</div>


