|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.egothor.util.BiQueue<Hit>
org.egothor.core.query.ResultList
public final class ResultList
A ResultList is a collection of Hits. The Hits at first are stored just as
document IDs gotten from a Barrel. Calling resolve(org.egothor.core.Barrel)
allows the retrieval of metadata of a
document.
This two step process speeds up the querying, because when preparing the ResultList, there is no need to load complete metadata of documents. When the final ResultList is ready, the metadata is loaded from the Barrels.
Hit.resolve()
Constructor Summary | |
---|---|
ResultList(int size,
long max_accepted,
double pagerank_rerank)
Constructor for the ResultList object. |
Method Summary | |
---|---|
boolean |
add(Hit item)
Add the given Hit if there is a free cell for it or it is greater than the lowest element of this array. |
void |
addGuessedHits(long hits)
|
void |
addHitsScanned(long hits)
|
void |
dump()
|
long |
getHitsScanned()
Return the total number of elements which were read during a query evaluation. |
long |
getWouldBe()
Return the total number of elements that tried to get to this structure via the add method. |
boolean |
isNotCramfull()
|
boolean |
lessThan(Hit a,
Hit b)
Test whether a is less than b . |
int |
linearize()
Transform this structure to a linear structure. |
void |
resolve(Barrel what)
Retrieve document metadata for the Hits in this ResultList. |
Methods inherited from class org.egothor.util.BiQueue |
---|
append, capacity, clear, cutOffLast, down, down, expand, item, itemto, peek, pop, push, replace, size, up |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultList(int size, long max_accepted, double pagerank_rerank)
size
- the desired size of this objectmax_accepted
- maximum number of hits this object acceptspagerank_rerank
- the rerank value, the rerank feature is not used iff the value
is not above 1.0Method Detail |
---|
public void dump()
public boolean isNotCramfull()
public void addGuessedHits(long hits)
public void addHitsScanned(long hits)
public long getWouldBe()
add
method.
public long getHitsScanned()
public boolean lessThan(Hit a, Hit b)
lessThan
in class BiQueue<Hit>
a
- the first objectb
- the object to compare to a
public void resolve(Barrel what)
what
- the Barrelpublic int linearize()
BiQueue
linearize
in class BiQueue<Hit>
public boolean add(Hit item)
item
- the Hit to add, if possible
isNotCramfull()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |