# What is the Kibana saved search filter autcomplete logic

**URL:** <https://discuss.elastic.co/t/what-is-the-kibana-saved-search-filter-autcomplete-logic/195586>\
**Category:** Kibana\
**Created:** [August 17, 2019, 6:18am UTC](https://discuss.elastic.co/t/what-is-the-kibana-saved-search-filter-autcomplete-logic/195586 "2019-08-17T06:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowboardcto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snowboardcto/32/44466_2.png) [@snowboardcto](https://discuss.elastic.co/u/snowboardcto)\
**Post date:** [August 17, 2019, 6:18am UTC](https://discuss.elastic.co/t/what-is-the-kibana-saved-search-filter-autcomplete-logic/195586/1 "2019-08-17T06:18:25Z")

</div>

I am trying to understand the logic for the Kibana saved search filter autocomplete menu. It seems to be a mix of past searches and available matches. Is there any description available on how the logic for this works?

![](https://us1.discourse-cdn.com/elastic/original/3X/9/8/98eb291f29a5149fe5045514e00b0d66e7eba658.png)

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [August 19, 2019, 12:29pm UTC](https://discuss.elastic.co/t/what-is-the-kibana-saved-search-filter-autcomplete-logic/195586/2 "2019-08-19T12:29:30Z")

</div>

From what I can tell, this list is driven off of the Kibana "[suggestion API](https://github.com/elastic/kibana/blob/4d88aaa2749afbcf7d1072547163a2c5c0737db5/src/legacy/core_plugins/kibana/server/routes/api/suggestions/register_value_suggestions.js)" API endpoint. Looking at this code, it appears Kibana uses a [terms aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html) to collect the relevant fields for the field in question.

---

<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:** [September 16, 2019, 12:29pm UTC](https://discuss.elastic.co/t/what-is-the-kibana-saved-search-filter-autcomplete-logic/195586/3 "2019-09-16T12:29:31Z")

</div>

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