Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
PhaedrusTheGreek opened this issue Jul 4, 2018 · 1 comment
Closed
Labels
>bug :Search/Search Search-related issues that do not fall into other categories

Comments

@PhaedrusTheGreek
Copy link
Contributor

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" ]
    }
  }
}
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@dliappis dliappis added :Search Relevance/Highlighting How a query matched a document >bug labels Jul 4, 2018
@jtibshirani jtibshirani added :Search/Search Search-related issues that do not fall into other categories and removed :Search Relevance/Highlighting How a query matched a document labels Jul 4, 2018
jimczi added a commit to jimczi/elasticsearch that referenced this issue Aug 21, 2018
This commit changes the query field expansion for query parsers
to not rely on an hardcoded list of field types. Instead we rely on
the type of exception that is thrown by MappedFieldType#termQuery to
include/exclude an expanded field.

Supersedes elastic#31655

Closes elastic#31798
jimczi added a commit that referenced this issue Aug 23, 2018
This commit changes the query field expansion for query parsers
to not rely on an hardcoded list of field types. Instead we rely on
the type of exception that is thrown by MappedFieldType#termQuery to
include/exclude an expanded field.

Supersedes #31655

Closes #31798
jimczi added a commit that referenced this issue Aug 23, 2018
This commit changes the query field expansion for query parsers
to not rely on an hardcoded list of field types. Instead we rely on
the type of exception that is thrown by MappedFieldType#termQuery to
include/exclude an expanded field.

Supersedes #31655

Closes #31798
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

4 participants