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.Loggerlogger-
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 SingleTermOpclone()java.lang.StringgetField()MatchingEntrygetMatcher(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.StringgetTerm()SingleTermOpsetField(java.lang.String newField)voidsetTerm(java.lang.String newTerm)java.lang.StringtoString()
-
-
-
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:Operatorget posting iterator for this query op.- Specified by:
getPostingIteratorin 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:Operatorget an entry for matching for this query op. calls getPostingIterator() internally- Specified by:
getMatcherin classOperator- Throws:
java.io.IOException
-
getField
public java.lang.String getField()
-
-