# Kibana not successfully filtering in Discover

**URL:** <https://discuss.elastic.co/t/kibana-not-successfully-filtering-in-discover/290918>\
**Category:** Kibana\
**Created:** [December 3, 2021, 4:16pm UTC](https://discuss.elastic.co/t/kibana-not-successfully-filtering-in-discover/290918 "2021-12-03T16:16:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![agentw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/agentw/32/55467_2.png) [@agentw](https://discuss.elastic.co/u/agentw)\
**Post date:** [December 3, 2021, 4:16pm UTC](https://discuss.elastic.co/t/kibana-not-successfully-filtering-in-discover/290918/1 "2021-12-03T16:16:29Z")

</div>

I recently updated our Elastic instances to 7.15.2. I am seeing mixed results when applying filters in Discover. For example, when filtering out a host on the agent.hostname field (i.e. 'NOT agent.hostname: example\_host), not all instances of the host are removed. If I filter for only that host (i.e. agent.hostname: example\_host), the filter appears to work correctly and only show results for 'example\_host'.

**Scope**  
This appears to only affect the logs-\* datastream coming from Elastic Agent instances. The agent.hostname field filters correctly on other Beats indices. I also only see this behavior on that specific field for logs-\*.

---

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [December 9, 2021, 2:51pm UTC](https://discuss.elastic.co/t/kibana-not-successfully-filtering-in-discover/290918/2 "2021-12-09T14:51:44Z")

</div>

Could you share with us:

1. Both correct and incorrect requests that are being made from Discover: `Discover > Inspect > request`

2. Result of `GET /_resolve/index/logs-*` in Dev tools. Both for `logs-*` and for any other working as expected pattern

3. Result of `GET logs-*/_field_caps?fields=agent.hostname` in Dev tools. Both for Both for `logs-*` and for any other working as expected pattern

---

<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:** [January 6, 2022, 2:52pm UTC](https://discuss.elastic.co/t/kibana-not-successfully-filtering-in-discover/290918/3 "2022-01-06T14:52:34Z")

</div>

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