# Custom search

**URL:** https://discuss.elastic.co/t/custom-search/38591
**Category:** Kibana
**Created:** [January 7, 2016, 10:13am UTC](https://discuss.elastic.co/t/custom-search/38591 "2016-01-07T10:13:02Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [January 7, 2016, 7:00pm UTC](https://discuss.elastic.co/t/custom-search/38591/2 "2016-01-07T19:00:45Z")

</div>

Not directly, no. You'll have to re-create the query using the agg builder in Visualize - that is, the interface on the left side there.

Things like `min_doc_count` we don't offer controls for in the interface, but if you click the _Advanced_ link at the bottom, it will expose a JSON input, which you can use to add that to the terms agg, like `{ "min_doc_count": 2 }`

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

To see that you have a match, click the green play button at the top to run the aggregation, and consult the spy panel below the visualization. Opening it will expose a _Request_ area, which will allow you to see the exact request that was made to Elasticsearch.

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

_NOTE: You won't see a Debug option if you are running a released build of Kibana_

Alternatively, you could get something close, and then save it. Then, go in to Setting \> Objects \> Visualizations, find the vis you just saved, and edit the _aggs_ section under _visState_. This is sort of a last-ditch effort though, and can lead to you breaking the visualization and putting Kibana into a weird (but recoverable) state...

---

_[View the full topic](https://discuss.elastic.co/t/custom-search/38591)._
