# Filtering with multiple values in elasticsearch (AWS elasticsearch)

**URL:** <https://discuss.elastic.co/t/filtering-with-multiple-values-in-elasticsearch-aws-elasticsearch/201969>\
**Category:** Elasticsearch\
**Created:** [October 2, 2019, 2:17pm UTC](https://discuss.elastic.co/t/filtering-with-multiple-values-in-elasticsearch-aws-elasticsearch/201969 "2019-10-02T14:17:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackOcean](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blackocean/32/19722_2.png) [@blackOcean](https://discuss.elastic.co/u/blackOcean)\
**Post date:** [October 2, 2019, 2:17pm UTC](https://discuss.elastic.co/t/filtering-with-multiple-values-in-elasticsearch-aws-elasticsearch/201969/1 "2019-10-02T14:17:50Z")

</div>

Hi,

We want to search based on testUuid with multiple values and it could be possible that there are more than 500 values.

I found two ways through which I can find information :

1. Bool with match\_phrase  
"query": {  
"bool": {  
"should": [  
{  
"match\_phrase": {  
"testUuid": "fdf5fb36-e400-43be-ad6a-391d0caf9b74"  
}  
},  
{  
"match\_phrase": {  
"testUuid": "3af66e0a-1c70-46ee-bf23-3d962d80d89d"  
}  
}  
]  
}  
}

2. Query String or Simple Query String :

I checked with profile true, it seems bool with match pharse is fast. I also observed that elasticsearch analyzer is tokenizing the uuids and separating with ' - '.

We are using AWS elasticsearch, where we don't have \_close endpoint and we can not update analyzer settings.

```
{
 "index": {
"analysis": {
  "filter": {
    "my_word_delimiter": {
      "type": "word_delimiter",
      "preserve_original": "true"
    }
  },
  "analyzer": {
    "my_analyzer": {
      "type": "custom",
      "tokenizer": "whitespace",
      "filter": [
        "testUuid"
      ]
    }
  }
} }
  } 

```

I want to understand which is the best way to filter multiple values and is it possible to change the analyzer settings in the aws elasticsearch without closed index.

---

<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:** [October 30, 2019, 2:17pm UTC](https://discuss.elastic.co/t/filtering-with-multiple-values-in-elasticsearch-aws-elasticsearch/201969/2 "2019-10-30T14:17:57Z")

</div>

Closed on October 30, 2019, 2:17pm UTC

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