# Partial result retrival

**URL:** <https://forum.search-guard.com/t/partial-result-retrival/1264>\
**Category:** Search Guard\
**Created:** [January 1, 2019, 11:41am UTC](https://forum.search-guard.com/t/partial-result-retrival/1264 "2019-01-01T11:41:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vostrodello15](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@vostrodello15](https://forum.search-guard.com/u/vostrodello15)\
**Post date:** [January 1, 2019, 11:41am UTC](https://forum.search-guard.com/t/partial-result-retrival/1264/1 "2019-01-01T11:41:55Z")

</div>

Hi!  
I was wondering if Search Guard could be used not only for allowing/blocking queries but to only query the indices that a user has access to .

For example, If I am a user that is mapped to a role allowing me to access only one specific index. I am preforming a “match all” query on all the indies in the cluster. Is it possible to only receive results from the one index I am authorized for?

Thank you!

---

<div class="post-metadata">

**Author:** ![searchguard\_google\_group](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/searchguard_google_group/32/462_2.png) [@searchguard\_google\_group](https://forum.search-guard.com/u/searchguard_google_group)\
**Post date:** [January 1, 2019, 1:25pm UTC](https://forum.search-guard.com/t/partial-result-retrival/1264/2 "2019-01-01T13:25:20Z")

</div>

sure, see

&nbsp;&nbsp;[Permissions help | Security for Elasticsearch | Search Guard](https://docs.search-guard.com/latest/troubleshooting-search-guard-permission#only-return-data-from-allowed-indices)  
&nbsp;&nbsp;[Installing the Search Guard Kibana Plugin | Security for Elasticsearch | Search Guard](https://docs.search-guard.com/latest/kibana-plugin-installation#configuring-elasticsearch-enable-do-not-fail-on-forbidden)

If you want Search Guard to return only data from allowed indices, and discard the security exceptions for the other ones, set do\_not\_fail\_on\_forbidden to true in sg\_config.yml:

searchguard:  
&nbsp;&nbsp;dynamic:  
&nbsp;&nbsp;&nbsp;&nbsp;kibana:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do\_not\_fail\_on\_forbidden: true

> **···**
>
> > Am 01.01.2019 um 12:41 schrieb vostrodello15@gmail.com:
> > 
> > Hi!  
> > I was wondering if Search Guard could be used not only for allowing/blocking queries but to only query the indices that a user has access to .  
> > For example, If I am a user that is mapped to a role allowing me to access only one specific index. I am preforming a "match all" query on all the indies in the cluster. Is it possible to only receive results from the one index I am authorized for?
> > 
> > Thank you!
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "Search Guard Community Forum" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.  
> > To post to this group, send email to search-guard@googlegroups.com.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/search-guard/f7ff2f0e-b4d7-4268-b296-e21ea857472a%40googlegroups.com\](https://groups.google.com/d/msgid/search-guard/f7ff2f0e-b4d7-4268-b296-e21ea857472a%40googlegroups.com%5C).  
> > For more options, visit [https://groups.google.com/d/optout\](https://groups.google.com/d/optout%5C).
