Skip to content

[7.7.0] Missing breaking change: null values for minimum_should_match #56812

@jayaddison

Description

@jayaddison

Elasticsearch version (bin/elasticsearch --version): 7.7.0

Plugins installed: []

JVM version (java -version): openjdk 14 2020-03-17

OS version (uname -a if on a Unix-like system): Linux basecamp 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
During execution of a bool query with minimum_should_match value set to null, an x_content_parse_exception was raised:

[bool] failed to parse field [minimum_should_match]

Steps to reproduce:

  1. Perform a bool query against an ES 7.7.0 cluster:
curl -H 'Content-Type: application/json' localhost:9200/_search --data '{"query": {"bool": {"minimum_should_match": null}}}'
  1. Encounter the error response:
{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[1:45] [bool] failed to parse field [minimum_should_match]"}],"type":"x_content_parse_exception","reason":"[1:45] [bool] failed to parse field [minimum_should_match]","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a VALUE_NULL at 1:45"}},"status":400}

Expected behaviour:
This query was valid in ES 7.6.2, and doesn't appear in the 'breaking changes' for 7.7.0 (ref), so this failure was unexpected.

  1. Perform a bool query against an ES 7.6.2 cluster:
curl -H 'Content-Type: application/json' localhost:9200/_search --data '{"query": {"bool": {"minimum_should_match": null}}}'
  1. Encounter a valid search response:
{"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"skipped":0,"failed":0},"hits":{"total":{"value":0,"relation":"eq"},"max_score":0.0,"hits":[]}}

Metadata

Metadata

Assignees

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