public final class CoveringQuery extends Query
Query
that allows to have a configurable number or required
matches per document. This is typically useful in order to build queries
whose query terms must all appear in documents.Constructor and Description |
---|
CoveringQuery(Collection<Query> queries,
LongValuesSource minimumNumberMatch)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost) |
boolean |
equals(Object obj) |
int |
hashCode() |
Query |
rewrite(IndexReader reader) |
String |
toString(String field) |
classHash, sameClassAs, toString
public CoveringQuery(Collection<Query> queries, LongValuesSource minimumNumberMatch)
queries
- Sub queries to match.minimumNumberMatch
- Per-document long value that records how many queries
should match. Values that are less than 1 are treated
like 1: only documents that have at least one
matching clause will be considered matches. Documents
that do not have a value for minimumNumberMatch
do not match.public Query rewrite(IndexReader reader) throws IOException
rewrite
in class Query
IOException
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight
in class Query
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.