public final class CoveringQuery extends Query implements Accountable
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.NULL_ACCOUNTABLE
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() |
long |
ramBytesUsed() |
Query |
rewrite(IndexReader reader) |
String |
toString(String field) |
void |
visit(QueryVisitor visitor) |
classHash, sameClassAs, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChildResources
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 long ramBytesUsed()
ramBytesUsed
in interface Accountable
public Query rewrite(IndexReader reader) throws IOException
rewrite
in class Query
IOException
public void visit(QueryVisitor visitor)
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight
in class Query
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.