# How to make auto Complete filters multiple contexts with an AND operator

**URL:** <https://discuss.elastic.co/t/how-to-make-auto-complete-filters-multiple-contexts-with-an-and-operator/263353>\
**Category:** Elasticsearch\
**Created:** [February 5, 2021, 8:48am UTC](https://discuss.elastic.co/t/how-to-make-auto-complete-filters-multiple-contexts-with-an-and-operator/263353 "2021-02-05T08:48:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![awan.soekamto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/awan.soekamto/32/78663_2.png) [@awan.soekamto](https://discuss.elastic.co/u/awan.soekamto)\
**Post date:** [February 5, 2021, 8:48am UTC](https://discuss.elastic.co/t/how-to-make-auto-complete-filters-multiple-contexts-with-an-and-operator/263353/1 "2021-02-05T08:48:45Z")

</div>

Hi,  
Is there any way I can return documents that match ALL the contexts?  
I use  
"contexts": {  
"suggestfilter\_groupid": [3],  
"suggestfilter\_userid": [306]  
}

I want to just return documents that matches groupid 3 AND userid 306.  
How do I do that?  
Thanks.

---

<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:** [March 5, 2021, 8:48am UTC](https://discuss.elastic.co/t/how-to-make-auto-complete-filters-multiple-contexts-with-an-and-operator/263353/2 "2021-03-05T08:48:51Z")

</div>

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