# Need an example to search incoming value in a Multi valued attribute

**URL:** <https://discuss.elastic.co/t/need-an-example-to-search-incoming-value-in-a-multi-valued-attribute/366917>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [September 22, 2024, 9:08am UTC](https://discuss.elastic.co/t/need-an-example-to-search-incoming-value-in-a-multi-valued-attribute/366917 "2024-09-22T09:08:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [September 22, 2024, 4:20pm UTC](https://discuss.elastic.co/t/need-an-example-to-search-incoming-value-in-a-multi-valued-attribute/366917/2 "2024-09-22T16:20:28Z")

</div>

Hi @vkrishna

Look this question, maybe the solution help you:

> [@Using TermsQuery in Java API Client \[7.17\]](https://discuss.elastic.co/t/using-termsquery-in-java-api-client-7-17/304904):
>
> I'm using Java API Client [7.17] in my project. I'm able to do most of the queries, but I'm trying to figure out how to search for multiple values in a particular fields and return values containing any of the values provided. I would assume Terms Query is what I'm looking for. But how do I pass a String array/list into the TermsQuery in Java API Client. For example how do I write the below in Java: GET /\_search { "query": { "terms": { "referenceno": ["xxx", "yyy"] } } } F…

---

_[View the full topic](https://discuss.elastic.co/t/need-an-example-to-search-incoming-value-in-a-multi-valued-attribute/366917)._
