Package org.terrier.matching.daat
Class Full
- java.lang.Object
-
- org.terrier.matching.BaseMatching
-
- org.terrier.matching.daat.Full
-
- All Implemented Interfaces:
Matching
- Direct Known Subclasses:
FatFull
public class Full extends 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. Documents are matched in a document-at-a-time fashion. In particular, the posting lists for all query terms are processed in parallel (but without threads). In comparison to TAAT matching, this reduces the memory consumption during matching, as documents which will not make the final retrieved set are discarded. After matching, the document score modifiers are applied if necessary. This Matching strategy uses the PostingListManager for opening and scoring postings.- Since:
- 3.5
- Author:
- Nicola Tonellotto and Craig Macdonald
- See Also:
PostingListManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.matching.BaseMatching
BaseMatching.MatchingState
-
-
Field Summary
-
Fields inherited from class org.terrier.matching.BaseMatching
BASE_MATCHING_TAG, collectionStatistics, documentModifiers, dsmNamespace, IGNORE_LOW_IDF_TERMS, index, invertedIndex, lexicon, logger, MATCH_EMPTY_QUERY, NONMATCHING_TAG
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assignNotScore(org.terrier.matching.daat.Full.DAATFullMatchingState state, int i, CandidateResult cc)
protected void
assignScore(org.terrier.matching.daat.Full.DAATFullMatchingState state, int i, CandidateResult cc)
assign the score for this posting to this candidate result.java.lang.String
getInfo()
Return a human readable description of this Matching classprotected void
initialisePostings(BaseMatching.MatchingState plm)
protected BaseMatching.MatchingState
initialiseState()
protected CandidateResult
makeCandidateResult(org.terrier.matching.daat.Full.DAATFullMatchingState state, int currentDocId)
protected CandidateResultSet
makeResultSet(org.terrier.matching.daat.Full.DAATFullMatchingState state, java.util.Queue<CandidateResult> candidateResultList)
ResultSet
match(java.lang.String queryNumber, MatchingQueryTerms queryTerms)
Get a ResultSet for the given query terms.protected static int
selectMinimumDocId(it.unimi.dsi.fastutil.longs.LongPriorityQueue postingHeap)
returns the docid of the lowest posting-
Methods inherited from class org.terrier.matching.BaseMatching
finalise, initialise, setCollectionStatistics
-
-
-
-
Constructor Detail
-
Full
public Full(Index index)
Create a new Matching instance based on the specified index
-
-
Method Detail
-
initialiseState
protected BaseMatching.MatchingState initialiseState()
- Overrides:
initialiseState
in classBaseMatching
-
initialisePostings
protected void initialisePostings(BaseMatching.MatchingState plm)
- Overrides:
initialisePostings
in classBaseMatching
-
match
public ResultSet match(java.lang.String queryNumber, MatchingQueryTerms queryTerms) throws java.io.IOException
Get a ResultSet for the given query terms.- Specified by:
match
in interfaceMatching
- Specified by:
match
in classBaseMatching
- Parameters:
queryNumber
- - some ID of the queryqueryTerms
- - query terms to match- Returns:
- ResultSet - the matched results
- Throws:
java.io.IOException
- if a problem occurs during matching
-
makeResultSet
protected CandidateResultSet makeResultSet(org.terrier.matching.daat.Full.DAATFullMatchingState state, java.util.Queue<CandidateResult> candidateResultList)
-
makeCandidateResult
protected CandidateResult makeCandidateResult(org.terrier.matching.daat.Full.DAATFullMatchingState state, int currentDocId)
-
assignNotScore
protected void assignNotScore(org.terrier.matching.daat.Full.DAATFullMatchingState state, int i, CandidateResult cc) throws java.io.IOException
- Throws:
java.io.IOException
-
assignScore
protected void assignScore(org.terrier.matching.daat.Full.DAATFullMatchingState state, int i, CandidateResult cc) throws java.io.IOException
assign the score for this posting to this candidate result.- Parameters:
i
- which query term index this representscc
- the candidate result object for this document- Throws:
java.io.IOException
-
selectMinimumDocId
protected static final int selectMinimumDocId(it.unimi.dsi.fastutil.longs.LongPriorityQueue postingHeap)
returns the docid of the lowest posting
-
getInfo
public java.lang.String getInfo()
Return a human readable description of this Matching class- Specified by:
getInfo
in interfaceMatching
- Specified by:
getInfo
in classBaseMatching
-
-