|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.matching.daat.CandidateResultSet
public class CandidateResultSet
ResultSet which is created from a set of CandidateResults. Used by DAAT matching strategies.
CandidateResult,
Serialized Form| Field Summary | |
|---|---|
protected int[] |
docids
|
protected int |
exactResultSize
|
protected java.util.concurrent.locks.Lock |
lock
|
protected short[] |
occurrences
|
protected int |
resultSize
|
protected double[] |
scores
|
protected int |
statusCode
|
| Constructor Summary | |
|---|---|
CandidateResultSet(java.util.List<CandidateResult> q)
Create a ResultSet from the specified list of results |
|
CandidateResultSet(java.util.Queue<CandidateResult> q)
Create a ResultSet from the specified queue of results |
|
| Method Summary | |
|---|---|
void |
addMetaItem(java.lang.String name,
int docid,
java.lang.String value)
Adds a metadata value for a given document |
void |
addMetaItems(java.lang.String name,
java.lang.String[] values)
Adds the metadata values for all the documents in the result set. |
int[] |
getDocids()
Returns the documents ids after retrieval |
int |
getExactResultSize()
Returns the exact size of the result set. |
java.util.concurrent.locks.Lock |
getLock()
Returns the lock associated with the result set. |
java.lang.String |
getMetaItem(java.lang.String name,
int docid)
Gets a metadata value for a given document. |
java.lang.String[] |
getMetaItems(java.lang.String name)
Gets the metadata information for all documents. |
java.lang.String[] |
getMetaKeys()
Returns the names of the meta keys which this resultset has |
short[] |
getOccurrences()
Returns the occurrences array. |
ResultSet |
getResultSet(int[] positions)
Extracts a subset of the resultset given by the list parameter, which contains a list of positions in the resultset that should be saved. |
ResultSet |
getResultSet(int start,
int length)
Crops the existing result file and extracts a subset from the given starting point, with the given length. |
int |
getResultSize()
Returns the effective size of the result set. |
double[] |
getScores()
Returns the documents scores after retrieval |
int |
getStatusCode()
Returns a status code for the result set |
boolean |
hasMetaItems(java.lang.String name)
Returns true if the resultset already has a set of metaitems with the specified name. |
void |
initialise()
Initialises the arrays prior of retrieval. |
void |
initialise(double[] scs)
Initialises the result set with the given scores. |
void |
setExactResultSize(int newExactResultSize)
Sets the exact size of the result set, that is the number of documents that contain at least one query term. |
void |
setResultSize(int newResultSize)
Sets the effective size of the result set, that is the number of documents to be sorted after retrieval. |
void |
setStatusCode(int _statusCode)
Sets the status code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] docids
protected double[] scores
protected short[] occurrences
protected int resultSize
protected int exactResultSize
protected java.util.concurrent.locks.Lock lock
protected int statusCode
| Constructor Detail |
|---|
public CandidateResultSet(java.util.Queue<CandidateResult> q)
public CandidateResultSet(java.util.List<CandidateResult> q)
| Method Detail |
|---|
public java.util.concurrent.locks.Lock getLock()
getLock in interface ResultSetpublic int getStatusCode()
getStatusCode in interface ResultSetpublic void setStatusCode(int _statusCode)
setStatusCode in interface ResultSet
public void addMetaItem(java.lang.String name,
int docid,
java.lang.String value)
ResultSet
addMetaItem in interface ResultSetname - the name of the metadata type. For example, it can be url for adding the URLs of documents.docid - the document identifier of the document.value - the metadata value.
public void addMetaItems(java.lang.String name,
java.lang.String[] values)
ResultSet
addMetaItems in interface ResultSetname - the name of the metadata type. For example, it can be url for adding the URLs of documents.values - the metadata values.
public java.lang.String getMetaItem(java.lang.String name,
int docid)
ResultSet
getMetaItem in interface ResultSetname - the name of the metadata type.docid - the document identifier of the document.
public java.lang.String[] getMetaItems(java.lang.String name)
ResultSet
getMetaItems in interface ResultSetname - the name of the metadata type.
public boolean hasMetaItems(java.lang.String name)
ResultSet
hasMetaItems in interface ResultSetname - of the desired metaitem set
public java.lang.String[] getMetaKeys()
ResultSet
getMetaKeys in interface ResultSetpublic int[] getDocids()
ResultSet
getDocids in interface ResultSetpublic double[] getScores()
ResultSet
getScores in interface ResultSetpublic short[] getOccurrences()
ResultSet
getOccurrences in interface ResultSetpublic int getResultSize()
ResultSet
getResultSize in interface ResultSetpublic int getExactResultSize()
ResultSet
getExactResultSize in interface ResultSet
public ResultSet getResultSet(int start,
int length)
getResultSet in interface ResultSetstart - the beginning of the subset.length - the length of the subset.
public ResultSet getResultSet(int[] positions)
ResultSet
getResultSet in interface ResultSetpositions - the list of elements in the current list that should be kept.
public void initialise()
ResultSet
initialise in interface ResultSetpublic void initialise(double[] scs)
ResultSet
initialise in interface ResultSetscs - double[] the scores to initiliase the result set with.public void setExactResultSize(int newExactResultSize)
ResultSet
setExactResultSize in interface ResultSetnewExactResultSize - int the effective size of the result set.public void setResultSize(int newResultSize)
ResultSet
setResultSize in interface ResultSetnewResultSize - int the effective size of the result set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||