public class FatQueryResultSet extends QueryResultSet implements FatResultSet
FatResultSet
.metadata, metaMap
arraysInitialised, docids, exactResultSize, lock, occurrences, resultSize, scores, statusCode
Constructor and Description |
---|
FatQueryResultSet(int numberOfDocuments,
CollectionStatistics cs,
String[] qs,
EntryStatistics[] es,
double[] ks) |
Modifier and Type | Method and Description |
---|---|
CollectionStatistics |
getCollectionStatistics()
Get the collection statistics that should be applied when (re)scoring any
documents in this query
|
EntryStatistics[] |
getEntryStatistics()
Return the EntryStatistics of each of the query terms in the query
|
double[] |
getKeyFrequencies()
Return the frequencies of each of the query terms in the query
|
WritablePosting[][] |
getPostings()
Returns a 2D array of posting objects for the document and terms in this result set.
|
String[] |
getQueryTerms()
Get the query terms in this query.
|
FatResultSet |
getResultSet(int start,
int length)
Crops the existing result file and extracts a subset
from the given starting point to the ending point.
|
void |
readFields(DataInput in) |
void |
setCollectionStatistics(CollectionStatistics cs) |
void |
setDocids(int[] ds) |
void |
setEntryStatistics(EntryStatistics[] es) |
void |
setKeyFrequencies(double[] ks) |
void |
setOccurrences(short[] os) |
void |
setPostings(WritablePosting[][] wp) |
void |
setQueryTerms(String[] qs) |
void |
setScores(double[] ss) |
void |
sort(int topDocs)
Sorts the top topDocs document in this resultset be first.
|
void |
write(DataOutput out) |
addMetaItem, addMetaItems, addMetaType, getMetaItem, getMetaItems, getMetaKeys, getResultSet, hasMetaItems, initialise, makeNewResultSet
getDocids, getExactResultSize, getLock, getOccurrences, getResultSize, getScores, getStatusCode, initialise, setExactResultSize, setResultSize, setStatusCode, sort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMetaItem, addMetaItems, getDocids, getExactResultSize, getLock, getMetaItem, getMetaItems, getMetaKeys, getOccurrences, getResultSet, getResultSize, getScores, getStatusCode, hasMetaItems, initialise, initialise, setExactResultSize, setResultSize, setStatusCode, sort
public FatQueryResultSet(int numberOfDocuments, CollectionStatistics cs, String[] qs, EntryStatistics[] es, double[] ks)
public WritablePosting[][] getPostings()
getPostings
in interface FatResultSet
public double[] getKeyFrequencies()
getKeyFrequencies
in interface FatResultSet
public EntryStatistics[] getEntryStatistics()
getEntryStatistics
in interface FatResultSet
public CollectionStatistics getCollectionStatistics()
getCollectionStatistics
in interface FatResultSet
public String[] getQueryTerms()
getQueryTerms
in interface FatResultSet
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public FatResultSet getResultSet(int start, int length)
getResultSet
in interface ResultSet
getResultSet
in class QueryResultSet
start
- the beginning of the subset.length
- the number of entries to get.public void sort(int topDocs)
sort
in interface ResultSet
sort
in class CollectionResultSet
topDocs
- number of documents to top-rankpublic void setPostings(WritablePosting[][] wp)
setPostings
in interface FatResultSet
public void setKeyFrequencies(double[] ks)
setKeyFrequencies
in interface FatResultSet
public void setEntryStatistics(EntryStatistics[] es)
setEntryStatistics
in interface FatResultSet
public void setCollectionStatistics(CollectionStatistics cs)
setCollectionStatistics
in interface FatResultSet
public void setQueryTerms(String[] qs)
setQueryTerms
in interface FatResultSet
public void setDocids(int[] ds)
setDocids
in interface FatResultSet
public void setOccurrences(short[] os)
setOccurrences
in interface FatResultSet
public void setScores(double[] ss)
setScores
in interface FatResultSet
Terrier 4.0. Copyright © 2004-2014 University of Glasgow