# Elastic Search Autocomplete with filtering

**URL:** <https://discuss.elastic.co/t/elastic-search-autocomplete-with-filtering/54350>\
**Category:** Elasticsearch\
**Created:** [June 30, 2016, 1:08am UTC](https://discuss.elastic.co/t/elastic-search-autocomplete-with-filtering/54350 "2016-06-30T01:08:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chaitanya\_Baratam](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Chaitanya\_Baratam](https://discuss.elastic.co/u/Chaitanya_Baratam)\
**Post date:** [June 30, 2016, 1:08am UTC](https://discuss.elastic.co/t/elastic-search-autocomplete-with-filtering/54350/1 "2016-06-30T01:08:36Z")

</div>

I am trying to combine it with the query or a filter with suggester, so  
that suggestions are returned only for the hits. Is it possible to  
constraint autcomplete (or any suggester for that matter) to work on a  
subset of data. E.g. I've got some users with associated documents and I  
want to serve them document title suggestions but only for the documents  
they can access. I have been searching for this in google and i only see  
an option of category filtering which is not helpful in my case. If i have to  
use category, then i have to add lots of categories for each document which  
is not possible. Please let me know if it is possible to achieve this.

---

<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:** [July 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/elastic-search-autocomplete-with-filtering/54350/2 "2017-07-05T22:39:27Z")

</div>


