|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.matching.CollectionResultSet
uk.ac.gla.terrier.matching.QueryResultSet
public class QueryResultSet
A result set for a given query. This result set is created for
a given number of documents, usually the number of retrieved
documents for a query. Initially, it is created by cropping
an instance of the CollectionResultSet, that is used in the
Matching classes.
This class has support for adding metadata as well.
| Constructor Summary | |
|---|---|
QueryResultSet(int numberOfDocuments)
A default constructor for the result set with a given number of documents. |
|
| Method Summary | |
|---|---|
void |
addMetaItem(java.lang.String name,
int index,
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. |
java.lang.String |
getMetaItem(java.lang.String name,
int index)
Gets a metadata value for a given document. |
java.lang.String[] |
getMetaItems(java.lang.String name)
Gets the metadata information for all documents. |
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 startPosition,
int length)
Crops the existing result file and extracts a subset from the given starting point to the ending point. |
void |
initialise()
Initialises the arrays prior of retrieval. |
| Methods inherited from class uk.ac.gla.terrier.matching.CollectionResultSet |
|---|
getDocids, getExactResultSize, getLock, getOccurrences, getResultSize, getScores, getStatusCode, initialise, setExactResultSize, setResultSize, setStatusCode |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryResultSet(int numberOfDocuments)
numberOfDocuments - the number of documents contained in the result set.| Method Detail |
|---|
public void initialise()
initialise in interface ResultSetinitialise in class CollectionResultSet
public void addMetaItem(java.lang.String name,
int index,
java.lang.String value)
addMetaItem in interface ResultSetaddMetaItem in class CollectionResultSetname - the name of the metadata type. For example, it can be url for adding the URLs of documents.index - the position in the resultset array of the given documentvalue - the metadata value.
public void addMetaItems(java.lang.String name,
java.lang.String[] values)
addMetaItems in interface ResultSetaddMetaItems in class CollectionResultSetname - 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 index)
getMetaItem in interface ResultSetgetMetaItem in class CollectionResultSetname - the name of the metadata type.index - the postition in the array
public java.lang.String[] getMetaItems(java.lang.String name)
getMetaItems in interface ResultSetgetMetaItems in class CollectionResultSetname - the name of the metadata type.
public ResultSet getResultSet(int startPosition,
int length)
getResultSet in interface ResultSetgetResultSet in class CollectionResultSetstartPosition - the beginning of the subset.length - the number of entries to get.
public ResultSet getResultSet(int[] positions)
getResultSet in interface ResultSetgetResultSet in class CollectionResultSetpositions - int[] the list of elements in the current
list that should be kept.
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||