# Visibility rules on search results from elastic

**URL:** <https://discuss.elastic.co/t/visibility-rules-on-search-results-from-elastic/109574>\
**Category:** Elasticsearch\
**Created:** [November 29, 2017, 11:15am UTC](https://discuss.elastic.co/t/visibility-rules-on-search-results-from-elastic/109574 "2017-11-29T11:15:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishekash](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@abhishekash](https://discuss.elastic.co/u/abhishekash)\
**Post date:** [November 29, 2017, 11:15am UTC](https://discuss.elastic.co/t/visibility-rules-on-search-results-from-elastic/109574/1 "2017-11-29T11:15:49Z")

</div>

Hello,

As part of search , we run our search query applying all the filters. After the search results are fetched, we need to know if the resource can be shown to this user. Which is governed by another web service.

Now, if i apply these authorization/ audience type filters myself after getting results from elastic search , it creates a lot of problems like the aggregations count changes post filter. Also, the pagination of results gets impacted.

Is a there a way to apply such rules as hook provided by elastic search. That is if i can implement some java class implementing some interface and then call some web service returning a boolean and then adding the search result to the final collection based on that.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [November 29, 2017, 11:40am UTC](https://discuss.elastic.co/t/visibility-rules-on-search-results-from-elastic/109574/2 "2017-11-29T11:40:49Z")

</div>

> [@abhishekash](#):
>
> This is a blocker for our search service to production for us and thus a bit urgent.
> 
> Let me know in case further clarity is needed.
> 
> @dadoonet @jasontedor @jpountz

While we love being part of a community here, and we love helping our users work with our stack, I think we need to level-set expectations here. The forums are volunteer-based, and there are no SLAs. If something is urgent for you have to understand this, and if it's that urgent, we offer support contracts with SLAs.

So: please do not ping people directly. If you need direct attention, a support contract is the way to go.

---

<div class="post-metadata">

**Author:** ![abhishekash](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@abhishekash](https://discuss.elastic.co/u/abhishekash)\
**Post date:** [November 29, 2017, 1:37pm UTC](https://discuss.elastic.co/t/visibility-rules-on-search-results-from-elastic/109574/3 "2017-11-29T13:37:09Z")

</div>

Apologies for sounding that way. I understand and appreciate your hard work for the community and that was more because of the strech to find a solution.

Some pointers on how to approach would be very helpful

---

<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 27, 2017, 1:37pm UTC](https://discuss.elastic.co/t/visibility-rules-on-search-results-from-elastic/109574/4 "2017-12-27T13:37:52Z")

</div>

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