# How to make search query more flexible?

**URL:** <https://discuss.elastic.co/t/how-to-make-search-query-more-flexible/218974>\
**Category:** Elasticsearch\
**Created:** [February 12, 2020, 12:30pm UTC](https://discuss.elastic.co/t/how-to-make-search-query-more-flexible/218974 "2020-02-12T12:30:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijith\_chandran](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhijith_chandran/32/60470_2.png) [@abhijith\_chandran](https://discuss.elastic.co/u/abhijith_chandran)\
**Post date:** [February 12, 2020, 12:30pm UTC](https://discuss.elastic.co/t/how-to-make-search-query-more-flexible/218974/1 "2020-02-12T12:30:35Z")

</div>

Hi,  
I am currently using this elasticsearch DSL query:

```auto
{
    "_source": [
        "title",
        "bench",
        "id_",
        "court",
        "date"
    ],
    "size": 15,
    "from": 0,
    "query": {
        "bool": {
            "must": {
                "multi_match": {
                    "query": "i r coelho",
                    "fields": [
                        "title",
                        "content"
                    ]
                }
            },
            "filter": [],
            "should": {
                "multi_match": {
                    "query": "i r coelho",
                    "fields": [
                        "title.standard^16",
                        "content.standard"
                    ]
                }
            }
        }
    },
    "highlight": {
        "pre_tags": [
            "<tag1>"
        ],
        "post_tags": [
            "</tag1>"
        ],
        "fields": {
            "content": {}
        }
    }
}

```

Here's what's happening. If I search for `I.r coelho` it returns the correct results. But, if I search for `I R coelho` (without the period) then it returns a different result. How do I prevent this from happening? I want the search to behave the same even if there are extra periods, spaces, commas etc.

---

<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:** [March 11, 2020, 12:30pm UTC](https://discuss.elastic.co/t/how-to-make-search-query-more-flexible/218974/2 "2020-03-11T12:30:50Z")

</div>

Closed on March 11, 2020, 12:30pm UTC

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