See {{org.apache.lucene.search.BooleanQuery.Builder#setMinimumNumberShouldMatch}} and https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html
We might want to allow either an absolute number of clauses (what the Lucene APIs offer) or a percentage (what both Solr and Elasticsearch offer, as an alternative).
Not sure about We should probably backporting this to 5. x 10 , since this not a bugfix and there is an easy way to do it with native Lucene queries... But I must admit the lack of such a feature must be really annoying when using the Elasticsearch integration , since : you basically have to write the whole boolean query and its subqueries as JSON if you want to set a minimum number of should clauses required to match. This means in particular no field bridge, and having to serialize filter parameters to JSON yourself. |
|