Package org.apache.lucene.search
Class CoveringQuery
- java.lang.Object
- 
- org.apache.lucene.search.Query
- 
- org.apache.lucene.search.CoveringQuery
 
 
- 
- All Implemented Interfaces:
- Accountable
 
 public final class CoveringQuery extends Query implements Accountable AQuerythat 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.- WARNING: This API is experimental and might change in incompatible ways in the next release.
 
- 
- 
Constructor SummaryConstructors Constructor Description CoveringQuery(Collection<Query> queries, LongValuesSource minimumNumberMatch)Sole constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)booleanequals(Object obj)inthashCode()longramBytesUsed()Queryrewrite(IndexReader reader)StringtoString(String field)voidvisit(QueryVisitor visitor)- 
Methods inherited from class org.apache.lucene.search.QueryclassHash, sameClassAs, toString
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.lucene.util.AccountablegetChildResources
 
- 
 
- 
- 
- 
Constructor Detail- 
CoveringQuerypublic CoveringQuery(Collection<Query> queries, LongValuesSource minimumNumberMatch) Sole constructor.- Parameters:
- 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.
 
 
- 
 - 
Method Detail- 
ramBytesUsedpublic long ramBytesUsed() - Specified by:
- ramBytesUsedin interface- Accountable
 
 - 
rewritepublic Query rewrite(IndexReader reader) throws IOException - Overrides:
- rewritein class- Query
- Throws:
- IOException
 
 - 
visitpublic void visit(QueryVisitor visitor) 
 - 
createWeightpublic Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Overrides:
- createWeightin class- Query
- Throws:
- IOException
 
 
- 
 
-