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| 构造器和说明 |
|---|
CoveringQuery(Collection<Query> queries,
LongValuesSource minimumNumberMatch)
Sole constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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, toStringgetChildResourcespublic 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 在接口中 Accountablepublic Query rewrite(IndexReader reader) throws IOException
rewrite 在类中 QueryIOExceptionpublic void visit(QueryVisitor visitor)
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight 在类中 QueryIOExceptionCopyright © 2022. All rights reserved.