# Search on Array Field in ElasticSearch

**URL:** <https://discuss.elastic.co/t/search-on-array-field-in-elasticsearch/348406>\
**Category:** Elasticsearch\
**Created:** [December 1, 2023, 8:12am UTC](https://discuss.elastic.co/t/search-on-array-field-in-elasticsearch/348406 "2023-12-01T08:12:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakhshunda\_Noorein\_J](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakhshunda_noorein_j/32/99407_2.png) [@Rakhshunda\_Noorein\_J](https://discuss.elastic.co/u/Rakhshunda_Noorein_J)\
**Post date:** [December 1, 2023, 8:12am UTC](https://discuss.elastic.co/t/search-on-array-field-in-elasticsearch/348406/1 "2023-12-01T08:12:00Z")

</div>

Hello,

I have inserted data to an index from a csv file. And I have an Ids field like this whose datatype is a text or a keyword.

```auto
"IDs": [
      "a07f1c55-e34b-467d-bfe2-f65f7e01ae61,3e7083d6-4e0c-4f7f-ac81-0d7c131ab584, b48cf97a-e561-42cf-ab21-2bf0f9091117"
    ]

```

I want to search on this field but the conditions are:

1. If I provide 2 ids I should get the documents with these 2 ids and also if a document containing these 2 ids but have an extra id it will search them also but not the document which matches only 1 id.

2. It should not search on half id provided. example, a07f1c55-e34b-467d-bfe2-f65f7e01ae61 is the actual id if i provide only a07f1c55 , it should not search on 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:** [December 29, 2023, 8:12am UTC](https://discuss.elastic.co/t/search-on-array-field-in-elasticsearch/348406/2 "2023-12-29T08:12:09Z")

</div>

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