Package org.terrier.matching.matchops
Class Operator
- java.lang.Object
-
- org.terrier.matching.matchops.Operator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
DateRangeOp
,MultiTermOp
,SingleTermOp
public abstract class Operator extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
A match op is a possible query "term" in the query- Since:
- 5.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
IGNORE_LOW_IDF_TERMS
-
Constructor Summary
Constructors Constructor Description Operator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Operator
clone()
boolean
equals(java.lang.Object _o)
abstract MatchingEntry
getMatcher(MatchingQueryTerms.QueryTermProperties qtp, Index index, Lexicon<java.lang.String> lex, PostingIndex<Pointer> inv, CollectionStatistics collStats)
get an entry for matching for this query op.abstract org.apache.commons.lang3.tuple.Pair<EntryStatistics,IterablePosting>
getPostingIterator(Index index)
get posting iterator for this query op.int
hashCode()
static Operator
parse(java.lang.String stringRep)
abstract java.lang.String
toString()
-
-
-
Method Detail
-
toString
public abstract java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getMatcher
public abstract MatchingEntry getMatcher(MatchingQueryTerms.QueryTermProperties qtp, Index index, Lexicon<java.lang.String> lex, PostingIndex<Pointer> inv, CollectionStatistics collStats) throws java.io.IOException
get an entry for matching for this query op. calls getPostingIterator() internally- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object _o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
clone
public Operator clone()
- Overrides:
clone
in classjava.lang.Object
-
getPostingIterator
public abstract org.apache.commons.lang3.tuple.Pair<EntryStatistics,IterablePosting> getPostingIterator(Index index) throws java.io.IOException
get posting iterator for this query op.- Returns:
- Pair, but Pair.of(null,null) if term not found
- Throws:
java.io.IOException
-
parse
public static Operator parse(java.lang.String stringRep)
-
-