# Searching arrays/lists

**URL:** <https://discuss.elastic.co/t/searching-arrays-lists/4480>\
**Category:** Elasticsearch\
**Created:** [May 26, 2011, 10:28am UTC](https://discuss.elastic.co/t/searching-arrays-lists/4480 "2011-05-26T10:28:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Kriesten](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jan\_Kriesten](https://discuss.elastic.co/u/Jan_Kriesten)\
**Post date:** [May 26, 2011, 10:28am UTC](https://discuss.elastic.co/t/searching-arrays-lists/4480/1 "2011-05-26T10:28:42Z")

</div>

Hi, another try:

I need to search a list of properties, so that both entries match:

{ "keywords" : [  
{  
"variant" : ["de\_at", "de\_de"],  
"value" : ["lebenslauf", "anschreiben"]  
},  
{  
"variant" : ["en\_gb", "en\_us"],  
"value" : ["cv", "application"]  
}  
] }

Given this, I'd like to search for 'en\_gb' AND 'cv', the match should be  
on the second property only. Searching for 'de\_de' AND 'cv' should  
result in an empty match. Everything I tried resulted in a hit with  
'de\_de' AND 'cv' as well. Can that be accomplished at all?

Best regards, Jan.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 26, 2011, 10:43am UTC](https://discuss.elastic.co/t/searching-arrays-lists/4480/2 "2011-05-26T10:43:36Z")

</div>

It can only be accomplished if you break it into different documents.

On Thursday, May 26, 2011 at 1:28 PM, Jan Kriesten wrote:

> Hi, another try:
> 
> I need to search a list of properties, so that both entries match:
> 
> { "keywords" : [  
> {  
> "variant" : ["de\_at", "de\_de"],  
> "value" : ["lebenslauf", "anschreiben"]  
> },  
> {  
> "variant" : ["en\_gb", "en\_us"],  
> "value" : ["cv", "application"]  
> }  
> ] }
> 
> Given this, I'd like to search for 'en\_gb' AND 'cv', the match should be  
> on the second property only. Searching for 'de\_de' AND 'cv' should  
> result in an empty match. Everything I tried resulted in a hit with  
> 'de\_de' AND 'cv' as well. Can that be accomplished at all?
> 
> Best regards, Jan.

---

<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, 4:05am UTC](https://discuss.elastic.co/t/searching-arrays-lists/4480/3 "2017-07-06T04:05:17Z")

</div>


