Package org.terrier.matching.matchops
Class ANDQueryOp
java.lang.Object
org.terrier.matching.matchops.Operator
org.terrier.matching.matchops.MultiTermOp
org.terrier.matching.matchops.ANDQueryOp
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
PhraseOp
,UnorderedWindowOp
public class ANDQueryOp extends MultiTermOp
This combines multiple operators into a single op, where must all occur
in a document. It is logically equivalent to Indri's #band() operator.
- Since:
- 5.0
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STRING_PREFIX
-
Constructor Summary
Constructors Constructor Description ANDQueryOp(java.lang.String[] ts)
ANDQueryOp(Operator[] ts)
-
Method Summary
Modifier and Type Method Description protected IterablePosting
createFinalPostingIterator(java.util.List<IterablePosting> postings, java.util.List<EntryStatistics> pointers)
protected EntryStatistics
mergeStatistics(EntryStatistics[] entryStats, CollectionStatistics collStats)
Adjust the statistics for this operator: 1.java.lang.String
toString()
Methods inherited from class org.terrier.matching.matchops.MultiTermOp
addStatistics, clone, getConstituents, getMatcher, getPostingIterator
-
Field Details
-
STRING_PREFIX
public static final java.lang.String STRING_PREFIX- See Also:
- Constant Field Values
-
-
Constructor Details
-
ANDQueryOp
public ANDQueryOp(java.lang.String[] ts) -
ANDQueryOp
-
-
Method Details
-
createFinalPostingIterator
protected IterablePosting createFinalPostingIterator(java.util.List<IterablePosting> postings, java.util.List<EntryStatistics> pointers) throws java.io.IOException- Specified by:
createFinalPostingIterator
in classMultiTermOp
- Throws:
java.io.IOException
-
mergeStatistics
protected EntryStatistics mergeStatistics(EntryStatistics[] entryStats, CollectionStatistics collStats)Adjust the statistics for this operator: 1. The number of occurrences is the minimum of the constituent frequencies (handled by super). 2. The in-document maxTF is the minimum of the constituent maxTFs- Overrides:
mergeStatistics
in classMultiTermOp
-
toString
public java.lang.String toString()
-