# "simple\_query\_string" with "default\_operator": "AND" doesn't imply "analyzer": "default"

**URL:** <https://discuss.elastic.co/t/simple-query-string-with-default-operator-and-doesnt-imply-analyzer-default/260485>\
**Category:** Elasticsearch\
**Created:** [January 7, 2021, 7:59pm UTC](https://discuss.elastic.co/t/simple-query-string-with-default-operator-and-doesnt-imply-analyzer-default/260485 "2021-01-07T19:59:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_Nezda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luke_nezda/32/47152_2.png) [@Luke\_Nezda](https://discuss.elastic.co/u/Luke_Nezda)\
**Post date:** [January 7, 2021, 7:59pm UTC](https://discuss.elastic.co/t/simple-query-string-with-default-operator-and-doesnt-imply-analyzer-default/260485/1 "2021-01-07T19:59:38Z")

</div>

Hello, all -

I went to convert some code using `query_string` to `simple_query_string` (using `"default_operator": "AND"` for both) and was surprised to find I needed to explicitly say `"analyzer": "default"` despite the `analyzer` documentation for both being identical. I'm not sure if this is a bug but I found it confusing. Reproducible test case below.

Kind regards,  
- Luke

```auto
    DELETE /myindex
    {}

    POST /myindex/_doc/1?refresh
    {
      "title": "Smith & Wesson"
    }

    # gets expected single result
    POST /myindex/_search?pretty
    {
      "query": {
        "query_string": {
          "default_operator": "AND",
          "query": "Smith & Wesson"
        }
      }
    }

    # no result?
    POST /myindex/_search?pretty
    {
      "query": {
        "simple_query_string": {
          "default_operator": "AND",
          "query": "Smith & Wesson"
        }
      }
    }

    # gets expected single result when specifying "analyzer": "default"
    POST /myindex/_search?pretty
    {
      "query": {
        "simple_query_string": {
          "default_operator": "AND",
          "query": "Smith & Wesson",
          "analyzer": "default"
        }
      }
    }

```

---

<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:** [February 4, 2021, 7:59pm UTC](https://discuss.elastic.co/t/simple-query-string-with-default-operator-and-doesnt-imply-analyzer-default/260485/2 "2021-02-04T19:59:47Z")

</div>

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