Skip to content

multi_match query with wildcard against boolean doesn't expand #31798

@PhaedrusTheGreek

Description

@PhaedrusTheGreek

Elasticsearch version : 6.3.0
JVM version : 1.8.0_144
OS version : OSX

To Reproduce:

  1. Index various data types:
PUT test3/doc/1
{
  "obj": {
    "flag": true,
    "text": "asdf",
    "numeric": 42
  }
}
  1. Search the boolean value with wildcard in field name:
GET /test3/_search
{
  "query": {
    "multi_match": {
      "query":    true,
      "fields":   [ "*.flag" ]
    }
  }
}

The above fails, even though the same search without expansion succeeds:

GET /test3/_search
{
  "query": {
    "multi_match": {
      "query":    true,
      "fields":   [ "obj.flag" ]
    }
  }
}

Text or Numeric searches with expansion succeed:

GET /test3/_search
{
  "query": {
    "multi_match": {
      "query":    42,
      "fields":   [ "*.numeric" ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories>bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions