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 backporting to 5.x, since this not a bugfix and there is an easy way to do it with native Lucene queries. |