|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.matching.AccumulatorResultSet
public class AccumulatorResultSet
A result set instance that uses maps internally until initialise() is called
| Field Summary | |
|---|---|
protected boolean |
arraysInitialised
|
int[] |
docids
docid[] |
protected int |
exactResultSize
|
protected java.util.concurrent.locks.Lock |
lock
|
protected boolean |
mapsInitialised
|
short[] |
occurrences
occurrences |
gnu.trove.TIntShortHashMap |
occurrencesMap
occurrence map |
protected int |
resultSize
|
double[] |
scores
scores[] |
gnu.trove.TIntDoubleHashMap |
scoresMap
score map |
protected int |
statusCode
|
| Constructor Summary | |
|---|---|
AccumulatorResultSet(int numberOfDocuments)
Constructs an instance of the AccumulatorResultSet |
|
| Method Summary | |
|---|---|
void |
addMetaItem(java.lang.String name,
int docid,
java.lang.String value)
Unsupported |
void |
addMetaItems(java.lang.String name,
java.lang.String[] values)
Unsupported |
AccumulatorResultSet |
getAccumulatorResultSet(int start,
int length)
|
int[] |
getDocids()
Returns the documents ids after retrieval |
int |
getExactResultSize()
Returns the exact size of the result set. |
java.util.concurrent.locks.Lock |
getLock()
get lock |
java.lang.String |
getMetaItem(java.lang.String name,
int docid)
Unsupported |
java.lang.String[] |
getMetaItems(java.lang.String name)
Unsupported |
java.lang.String[] |
getMetaKeys()
Unsupported |
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()
get status code |
boolean |
hasMetaItems(java.lang.String name)
Unsupported |
void |
initialise()
This method initialises the arrays to be sorted, after the matching phase has been completed |
void |
initialise(double[] scs)
Unsupported |
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)
set status code |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int[] docids
public double[] scores
public short[] occurrences
protected boolean arraysInitialised
public gnu.trove.TIntDoubleHashMap scoresMap
public gnu.trove.TIntShortHashMap occurrencesMap
protected boolean mapsInitialised
protected int resultSize
protected int exactResultSize
protected java.util.concurrent.locks.Lock lock
protected int statusCode
| Constructor Detail |
|---|
public AccumulatorResultSet(int numberOfDocuments)
numberOfDocuments - | 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 ResultSetpublic void initialise()
initialise in interface ResultSetpublic void initialise(double[] scs)
initialise in interface ResultSetscs - double[] the scores to initiliase the result set with.public int[] getDocids()
getDocids in interface ResultSetpublic int getResultSize()
getResultSize in interface ResultSetpublic short[] getOccurrences()
getOccurrences in interface ResultSetpublic int getExactResultSize()
getExactResultSize in interface ResultSetpublic double[] getScores()
getScores in interface ResultSetpublic void setResultSize(int newResultSize)
setResultSize in interface ResultSetnewResultSize - int the effective size of the result set.public void setExactResultSize(int newExactResultSize)
setExactResultSize in interface ResultSetnewExactResultSize - int the effective size of the result set.
public void addMetaItem(java.lang.String name,
int docid,
java.lang.String value)
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)
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)
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)
getMetaItems in interface ResultSetname - the name of the metadata type.
public boolean hasMetaItems(java.lang.String name)
hasMetaItems in interface ResultSetname - of the desired metaitem set
public java.lang.String[] getMetaKeys()
getMetaKeys 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)
getResultSet in interface ResultSetpositions - the list of elements in the current list that should be kept.
public AccumulatorResultSet getAccumulatorResultSet(int start,
int length)
Returns a ResultSet starting at the
pre-determined position, of the specified size.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||