"simple_query_string" with "default_operator": "AND" doesn't imply "analyzer": "default"

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

    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"
        }
      }
    }

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