Mimum_match broken in 0.19.0 or is this expected behavior?

I run this query in 0.18.6 and it works fine.

curl -XGET 'http://localhost:9200/messages/data/_search?pretty=true' -
d '{
"fields" : [ "genId" ],
"filter" : {
"terms" : { "tags" : [ "green","red" ], "minimum_match" : 1 }
}
}'

Run this query in 0.19.0 ( rebuilt indexes ) and I get the following
error:

"error" : "SearchPhaseExecutionException[Failed to execute phase
[query], total failure; shardFailures {[Tzo9OeseRJKIgtJnwpv8Jw]
[messages][0]: SearchParseException[[messages][0]: from[-1],size[-1]:
Parse Failure [Failed to parse source [{\n "fields" : [ "genId" ],
\n "filter" : {\n "terms" : { "tags" : [ "green","red
" ], "minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][3]:
SearchParseException[[messages][3]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][4]:
SearchParseException[[messages][4]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][1]:
SearchParseException[[messages][1]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][2]:
SearchParseException[[messages][2]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }]",
"status" : 500

Thanks,

Garth

Thats because minimum_match is not a valid parameter to terms filter…, in 0.19, we try and tell you better that thats not a valid flag.

On Tuesday, March 6, 2012 at 6:50 PM, Garth wrote:

I run this query in 0.18.6 and it works fine.

curl -XGET 'http://localhost:9200/messages/data/_search?pretty=true' -
d '{
"fields" : [ "genId" ],
"filter" : {
"terms" : { "tags" : [ "green","red" ], "minimum_match" : 1 }
}
}'

Run this query in 0.19.0 ( rebuilt indexes ) and I get the following
error:

"error" : "SearchPhaseExecutionException[Failed to execute phase
[query], total failure; shardFailures {[Tzo9OeseRJKIgtJnwpv8Jw]
[messages][0]: SearchParseException[[messages][0]: from[-1],size[-1]:
Parse Failure [Failed to parse source [{\n "fields" : [ "genId" ],
\n "filter" : {\n "terms" : { "tags" : [ "green","red
" ], "minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][3]:
SearchParseException[[messages][3]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][4]:
SearchParseException[[messages][4]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][1]:
SearchParseException[[messages][1]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }{[Tzo9OeseRJKIgtJnwpv8Jw][messages][2]:
SearchParseException[[messages][2]: from[-1],size[-1]: Parse Failure
[Failed to parse source [{\n "fields" : [ "genId" ],\n "filter
" : {\n "terms" : { "tags" : [ "green","red" ],
"minimum_match" : 1 }\n }\n}]]]; nested:
QueryParsingException[[messages] [terms] filter does not support
[minimum_match]]; }]",
"status" : 500

Thanks,

Garth