Package org.terrier.matching.matchops
Class PrefixTermOp
- java.lang.Object
-
- org.terrier.matching.matchops.Operator
-
- org.terrier.matching.matchops.MultiTermOp
-
- org.terrier.matching.matchops.SynonymOp
-
- org.terrier.matching.matchops.PrefixTermOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
FuzzyTermOp
public class PrefixTermOp extends SynonymOp
A synonym class that matches terms with a common prefix in the lexicon.- Since:
- 5.0
- Author:
- Craig Macdonald
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
static java.lang.String
STRING_PREFIX
-
Fields inherited from class org.terrier.matching.matchops.Operator
IGNORE_LOW_IDF_TERMS
-
-
Constructor Summary
Constructors Constructor Description PrefixTermOp(java.lang.String searchString)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getEndString(java.lang.String termLo)
org.apache.commons.lang3.tuple.Pair<EntryStatistics,IterablePosting>
getPostingIterator(Index index)
get posting iterator for this query op.protected java.lang.String
getStartString(java.lang.String search)
java.lang.String
toString()
-
Methods inherited from class org.terrier.matching.matchops.SynonymOp
createFinalPostingIterator, mergeStatistics
-
Methods inherited from class org.terrier.matching.matchops.MultiTermOp
addStatistics, clone, getConstituents, getMatcher
-
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
STRING_PREFIX
public static final java.lang.String STRING_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStartString
protected java.lang.String getStartString(java.lang.String search)
-
getEndString
protected java.lang.String getEndString(java.lang.String termLo)
-
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.- Overrides:
getPostingIterator
in classMultiTermOp
- Returns:
- Pair, but Pair.of(null,null) if term not found
- Throws:
java.io.IOException
-
-