# View surrounding documents is losing the filter

**URL:** https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976
**Category:** Kibana
**Created:** [November 21, 2019, 8:21pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976 "2019-11-21T20:21:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [November 21, 2019, 8:21pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976/1 "2019-11-21T20:21:50Z")

</div>

I have a filter in the Discoverer view that is pinned. When I click the 'view surrounding documents' link i'm taking to the context view but the pinned filters are lost. I'm using Kibana 7.4.2. I had a similar issue with Kibana 7.2.

---

<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: [November 21, 2019, 8:55pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976/2 "2019-11-21T20:55:49Z")

</div>

Hey @data_smith,

If I'm understanding you correctly, it sounds like you're running into this issue: [https://github.com/elastic/kibana/issues/22478](https://github.com/elastic/kibana/issues/22478)

I'm not sure what the priority of this issue is, but I'd recommend adding a "thumbs up" reaction to the issue to cast your vote

---

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [November 21, 2019, 9:12pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976/3 "2019-11-21T21:12:32Z")

</div>

Hi Larry. In that link you provided, Bargs showed a screenshot of the filters that are pinned and then they are carried over to the context view. I'm using 7.4.2 and the pinned filters aren't carried over.

link showing the pinned filters carrying over to the context view

> <https://github.com/elastic/kibana/issues/22478#issuecomment-420041417>
>
> If you have a filter/query specified from the discover screen and then view surrounding documents, the surrounding documents view will lose...

So I have a whole bunch of docker log records and when users click 'view surrounding documents' they see logs for many different containers. They have to reenter the filter each time if they want to see the surrounding documents for their container.

---

<div class="post-metadata">

### Author: ![data\_smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/data_smith/32/124122_2.png) [@data\_smith](https://discuss.elastic.co/u/data_smith)
#### Post date: [November 21, 2019, 9:21pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976/4 "2019-11-21T21:21:46Z")

</div>

We should probably update the documentation. Because right now it's stating that pinned filters are carried over.

[https://www.elastic.co/guide/en/kibana/current/document-context.html#filter-context](https://www.elastic.co/guide/en/kibana/current/document-context.html#filter-context)

This will be a problem for anyone that use Elastic to store Docker log records.

---

<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: [December 19, 2019, 9:21pm UTC](https://discuss.elastic.co/t/view-surrounding-documents-is-losing-the-filter/208976/5 "2019-12-19T21:21:50Z")

</div>

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