|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.search.FacetResultsHandler org.apache.lucene.facet.search.DepthOneFacetResultsHandler
public abstract class DepthOneFacetResultsHandler
A FacetResultsHandler
which counts the top-K facets at depth 1 only
and always labels all result categories. The results are always sorted by
value, in descending order. Sub-classes are responsible to pull the values
from the corresponding FacetArrays
.
Field Summary |
---|
Fields inherited from class org.apache.lucene.facet.search.FacetResultsHandler |
---|
facetArrays, facetRequest, taxonomyReader |
Constructor Summary | |
---|---|
DepthOneFacetResultsHandler(TaxonomyReader taxonomyReader,
FacetRequest facetRequest,
FacetArrays facetArrays)
|
Method Summary | |
---|---|
protected abstract void |
addSiblings(int ordinal,
int[] siblings,
ArrayList<FacetResultNode> nodes)
Add the siblings of ordinal to the given list. |
protected abstract int |
addSiblings(int ordinal,
int[] siblings,
PriorityQueue<FacetResultNode> pq)
Add the siblings of ordinal to the given PriorityQueue . |
FacetResult |
compute()
Computes the FacetResult for the given FacetArrays . |
protected abstract double |
valueOf(int ordinal)
Returnt the value of the requested ordinal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DepthOneFacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest, FacetArrays facetArrays)
Method Detail |
---|
protected abstract double valueOf(int ordinal)
protected abstract void addSiblings(int ordinal, int[] siblings, ArrayList<FacetResultNode> nodes) throws IOException
ordinal
to the given list. This is called
whenever the number of results is too high (> taxonomy size), instead of
adding them to a PriorityQueue
.
IOException
protected abstract int addSiblings(int ordinal, int[] siblings, PriorityQueue<FacetResultNode> pq)
ordinal
to the given PriorityQueue
. The
given PriorityQueue
is already filled with sentinel objects, so
implementations are encouraged to use PriorityQueue.top()
and
PriorityQueue.updateTop()
for best performance.
public final FacetResult compute() throws IOException
FacetResultsHandler
FacetResult
for the given FacetArrays
.
compute
in class FacetResultsHandler
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |