public abstract class BaseMatching extends Object implements Matching
Properties
Modifier and Type | Field and Description |
---|---|
protected CollectionStatistics |
collectionStatistics
The collection statistics
|
protected List<DocumentScoreModifier> |
documentModifiers
Contains the document score modifiers to be applied for a query.
|
protected static 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<Pointer> |
invertedIndex
The inverted file.
|
protected Lexicon<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 List<Map.Entry<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 |
Modifier | Constructor and Description |
---|---|
protected |
BaseMatching() |
|
BaseMatching(Index _index)
Constructs an instance of the BaseMatching
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalise(MatchingQueryTerms queryTerms) |
abstract 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(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
|
protected long totalTime
protected static final org.apache.log4j.Logger logger
protected static 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 PostingIndex<Pointer> invertedIndex
protected CollectionStatistics collectionStatistics
protected ResultSet resultSet
protected List<DocumentScoreModifier> documentModifiers
protected WeightingModel[][] wm
protected List<Map.Entry<String,LexiconEntry>> queryTermsToMatchList
protected BaseMatching()
public BaseMatching(Index _index)
_index
- 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 String getInfo()
public abstract ResultSet match(String queryNumber, MatchingQueryTerms queryTerms) throws IOException
match
in interface Matching
queryNumber
- - some ID of the queryqueryTerms
- - query terms to matchIOException
- if a problem occurs during matchingTerrier 4.0. Copyright © 2004-2014 University of Glasgow