Skip to content

bug in query_string : syntax "field:(v1 v2)" does not work anymore on keyword properties #28719

@fbaligand

Description

@fbaligand

Describe the issue:
On Elasticsearch 5.x, in a query_string query, we can use syntax field:(v1 v2 v3) which is the same than field:(v1 OR v2 OR v3)
It does not work anymore with elasticsearch 6.1 on keyword properties : no results returned although field:(v1 OR v2 OR v3) syntax works fine.
It looks like a regression.

Elasticsearch version : 6.1.0 and 6.1.3

JVM version : 1.8.0_131

OS version : Linux RHEL 6

Steps to reproduce:
In Kibana Console :

PUT index1/doc/1
{
"f1": "v1"
}

POST index1/_search
{
  "query": {
    "query_string": {
      "query": "f1.keyword:(v1 v2)"
    }
  }
}

=> returns nothing

POST index1/_search
{
  "query": {
    "query_string": {
      "query": "f1.keyword:(v1 OR v2)"
    }
  }
}

=> returns the doc

POST index1/_search
{
  "query": {
    "query_string": {
      "query": "f1:(v1 v2)"
    }
  }
}

=> returns the doc

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories>docsGeneral docs changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions