Bool filter does not support "minimum_number_should_match"?

I'm using latest pyes (v0.19) and elasticsearch (v0.19.4). Pyes seems
always adding "minimum_number_should_match" parameter to the "should"
BoolQuery.

This works just fine:

q1 = pyes.BoolQuery()
q1.add_should(pyes.TermQuery('_id', '1'))
conn.search(q1)

But if I put it into a filter, it breaks.

q2 = pyes.FilteredQuery(pyes.MatchAllQuery(), q1)
conn.search(q2)

QueryParsingException[[...] [bool] filter does not support
[minimum_number_should_match]];

I don't remember this was a problem before I upgraded Elasticsearch
(probably was 0.18.x)? Any reason why Bool filter does not support
"minimum_number_should_match"? Or maybe pyes should remove it from Bool
Filter?

Thanks,

Chunlei

It was never supported in a bool filter, in 0.19 it now throws a proper
failure.

On Fri, Jun 8, 2012 at 12:47 AM, Chunlei Wu reillywu@gmail.com wrote:

I'm using latest pyes (v0.19) and elasticsearch (v0.19.4). Pyes seems
always adding "minimum_number_should_match" parameter to the "should"
BoolQuery.

This works just fine:

q1 = pyes.BoolQuery()
q1.add_should(pyes.TermQuery('_id', '1'))
conn.search(q1)

But if I put it into a filter, it breaks.

q2 = pyes.FilteredQuery(pyes.MatchAllQuery(), q1)
conn.search(q2)

QueryParsingException[[...] [bool] filter does not support
[minimum_number_should_match]];

I don't remember this was a problem before I upgraded Elasticsearch
(probably was 0.18.x)? Any reason why Bool filter does not support
"minimum_number_should_match"? Or maybe pyes should remove it from Bool
Filter?

Thanks,

Chunlei

I see, that explains. So it should be at pyes side to remove
"minimum_number_should_match" parameter from bool filter.

Thanks,

Chunlei