Package org.terrier.matching.matchops
Class SingleTermOp
- java.lang.Object
-
- org.terrier.matching.matchops.Operator
-
- org.terrier.matching.matchops.SingleTermOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class SingleTermOp extends Operator
This class implements a single indexing token as a matching op.- Since:
- 5.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
-
Fields inherited from class org.terrier.matching.matchops.Operator
IGNORE_LOW_IDF_TERMS
-
-
Constructor Summary
Constructors Constructor Description SingleTermOp(java.lang.String t)
SingleTermOp(java.lang.String t, java.lang.String f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleTermOp
clone()
java.lang.String
getField()
MatchingEntry
getMatcher(MatchingQueryTerms.QueryTermProperties qtp, Index index, Lexicon<java.lang.String> lexicon, PostingIndex<Pointer> invertedIndex, CollectionStatistics collectionStatistics)
get an entry for matching for this query op.org.apache.commons.lang3.tuple.Pair<EntryStatistics,IterablePosting>
getPostingIterator(Index index)
get posting iterator for this query op.java.lang.String
getTerm()
SingleTermOp
setField(java.lang.String newField)
void
setTerm(java.lang.String newTerm)
java.lang.String
toString()
-
-
-
Method Detail
-
getTerm
public java.lang.String getTerm()
-
setTerm
public void setTerm(java.lang.String newTerm)
-
setField
public SingleTermOp setField(java.lang.String newField)
-
clone
public SingleTermOp clone()
-
getPostingIterator
public org.apache.commons.lang3.tuple.Pair<EntryStatistics,IterablePosting> getPostingIterator(Index index) throws java.io.IOException
Description copied from class:Operator
get posting iterator for this query op.- Specified by:
getPostingIterator
in classOperator
- Returns:
- Pair, but Pair.of(null,null) if term not found
- Throws:
java.io.IOException
-
getMatcher
public MatchingEntry getMatcher(MatchingQueryTerms.QueryTermProperties qtp, Index index, Lexicon<java.lang.String> lexicon, PostingIndex<Pointer> invertedIndex, CollectionStatistics collectionStatistics) throws java.io.IOException
Description copied from class:Operator
get an entry for matching for this query op. calls getPostingIterator() internally- Specified by:
getMatcher
in classOperator
- Throws:
java.io.IOException
-
getField
public java.lang.String getField()
-
-