|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.matching.BaseMatching
public abstract class BaseMatching
Performs the matching of documents with a query, by first assigning scores to documents for each query term and modifying these scores with the appropriate modifiers. Then, a series of document score modifiers are applied if necessary.
Properties
Field Summary | |
---|---|
protected CollectionStatistics |
collectionStatistics
The collection statistics |
protected java.util.List<DocumentScoreModifier> |
documentModifiers
Contains the document score modifiers to be applied for a query. |
protected static java.lang.String |
dsmNamespace
the default namespace for the document score modifiers that are specified in the properties file. |
protected static boolean |
IGNORE_LOW_IDF_TERMS
A property that enables to ignore the terms with a low IDF. |
protected Index |
index
The index used for retrieval. |
protected PostingIndex<BitIndexPointer> |
invertedIndex
The inverted file. |
protected Lexicon<java.lang.String> |
lexicon
The lexicon used. |
protected static org.apache.log4j.Logger |
logger
the logger for this class |
protected static boolean |
MATCH_EMPTY_QUERY
A property that when it is true, it allows matching all documents to an empty query. |
protected int |
numberOfRetrievedDocuments
The number of retrieved documents for a query. |
protected java.util.List<java.util.Map.Entry<java.lang.String,LexiconEntry>> |
queryTermsToMatchList
|
protected ResultSet |
resultSet
The result set. |
protected static int |
RETRIEVED_SET_SIZE
The maximum number of documents in the final retrieved set. |
protected long |
totalTime
|
protected WeightingModel[][] |
wm
|
Constructor Summary | |
---|---|
protected |
BaseMatching()
|
|
BaseMatching(Index _index)
Constructs an instance of the BaseMatching |
Method Summary | |
---|---|
protected void |
finalise(MatchingQueryTerms queryTerms)
|
abstract java.lang.String |
getInfo()
Return a human readable description of this Matching class |
long |
getTotalTime()
get the total time |
protected void |
initialise(MatchingQueryTerms queryTerms)
|
protected void |
initialisePostings(MatchingQueryTerms queryTerms)
|
abstract ResultSet |
match(java.lang.String queryNumber,
MatchingQueryTerms queryTerms)
Get a ResultSet for the given query terms. |
void |
setCollectionStatistics(CollectionStatistics cs)
Update the collection statistics being used by this matching instance |
void |
updateEndTime(long t)
Update the end time. |
void |
updateStartTime(long t)
Update the start time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long totalTime
protected static final org.apache.log4j.Logger logger
protected static java.lang.String dsmNamespace
protected static int RETRIEVED_SET_SIZE
protected static boolean IGNORE_LOW_IDF_TERMS
protected static boolean MATCH_EMPTY_QUERY
protected int numberOfRetrievedDocuments
protected Index index
protected Lexicon<java.lang.String> lexicon
protected PostingIndex<BitIndexPointer> invertedIndex
protected CollectionStatistics collectionStatistics
protected ResultSet resultSet
protected java.util.List<DocumentScoreModifier> documentModifiers
protected WeightingModel[][] wm
protected java.util.List<java.util.Map.Entry<java.lang.String,LexiconEntry>> queryTermsToMatchList
Constructor Detail |
---|
protected BaseMatching()
public BaseMatching(Index _index)
_index
- Method Detail |
---|
public void updateStartTime(long t)
t
- public void updateEndTime(long t)
t
- public long getTotalTime()
protected void initialisePostings(MatchingQueryTerms queryTerms)
protected void initialise(MatchingQueryTerms queryTerms)
protected void finalise(MatchingQueryTerms queryTerms)
public void setCollectionStatistics(CollectionStatistics cs)
setCollectionStatistics
in interface Matching
cs
- CollectionStatistics to use during matchingpublic abstract java.lang.String getInfo()
getInfo
in interface Matching
public abstract ResultSet match(java.lang.String queryNumber, MatchingQueryTerms queryTerms) throws java.io.IOException
match
in interface Matching
queryNumber
- - some ID of the queryqueryTerms
- - query terms to match
java.io.IOException
- if a problem occurs during matching
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |