# Matching array values to a field that is an array

**URL:** <https://discuss.elastic.co/t/matching-array-values-to-a-field-that-is-an-array/8961>\
**Category:** Elasticsearch\
**Created:** [September 8, 2012, 7:34pm UTC](https://discuss.elastic.co/t/matching-array-values-to-a-field-that-is-an-array/8961 "2012-09-08T19:34:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayd3e](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jayd3e/32/2731_2.png) [@jayd3e](https://discuss.elastic.co/u/jayd3e)\
**Post date:** [September 8, 2012, 7:34pm UTC](https://discuss.elastic.co/t/matching-array-values-to-a-field-that-is-an-array/8961/1 "2012-09-08T19:34:30Z")

</div>

So I have some posts, that have a list of groups attached to each of them.  
Is there a way to provide elastic search with a list of filtered groups  
that the user is filtering by, and if one of those ids(in the list of  
filtered groups) is present in a post's list of groups, match that post  
document?

--

---

<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 6, 2017, 3:13am UTC](https://discuss.elastic.co/t/matching-array-values-to-a-field-that-is-an-array/8961/2 "2017-07-06T03:13:35Z")

</div>


