public abstract class DefaultFacetCountCollector extends Object implements FacetCountCollector
| Modifier and Type | Field and Description |
|---|---|
protected BigSegmentedArray |
_array |
int[] |
_count |
int |
_countlength |
protected FacetDataCache |
_dataCache |
protected FacetSpec |
_ospec |
protected BrowseSelection |
_sel |
protected LinkedList<int[]> |
intarraylist |
protected static MemoryManager<int[]> |
intarraymgr |
EMPTY_FACET_LIST| Constructor and Description |
|---|
DefaultFacetCountCollector(String name,
FacetDataCache dataCache,
int docBase,
BrowseSelection sel,
FacetSpec ospec) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Responsible for release resources used.
|
abstract void |
collect(int docid)
Collect a hit.
|
abstract void |
collectAll()
Collects all hits.
|
int[] |
getCountDistribution()
Returns an integer array representing the distribution function of a given facet.
|
BrowseFacet |
getFacet(String value)
Gets the facet given a value.
|
FacetDataCache |
getFacetDataCache() |
int |
getFacetHitsCount(Object value)
Gets the facet count given a value.
|
List<BrowseFacet> |
getFacets()
Gets gathered top facets
|
static List<BrowseFacet> |
getFacets(FacetSpec ospec,
int[] count,
int countlength,
TermValueList<?> valList) |
String |
getName()
Gets the name of the facet
|
FacetIterator |
iterator()
This function returns an Iterator to visit the facets in value order
|
protected final FacetSpec _ospec
public int[] _count
public int _countlength
protected FacetDataCache _dataCache
protected final BrowseSelection _sel
protected final BigSegmentedArray _array
protected final LinkedList<int[]> intarraylist
protected static MemoryManager<int[]> intarraymgr
public DefaultFacetCountCollector(String name, FacetDataCache dataCache, int docBase, BrowseSelection sel, FacetSpec ospec)
public String getName()
FacetCountCollectorgetName in interface FacetCountCollectorpublic abstract void collect(int docid)
FacetCountCollectorcollect in interface FacetCountCollectordocid - docpublic abstract void collectAll()
FacetCountCollectorcollectAll in interface FacetCountCollectorpublic BrowseFacet getFacet(String value)
FacetAccessiblegetFacet in interface FacetAccessiblevalue - Facet valuepublic int getFacetHitsCount(Object value)
FacetAccessiblegetFacetHitsCount in interface FacetAccessiblevalue - Facet valuepublic int[] getCountDistribution()
FacetCountCollectorgetCountDistribution in interface FacetCountCollectorpublic FacetDataCache getFacetDataCache()
public static List<BrowseFacet> getFacets(FacetSpec ospec, int[] count, int countlength, TermValueList<?> valList)
public List<BrowseFacet> getFacets()
FacetAccessiblegetFacets in interface FacetAccessiblepublic void close()
FacetAccessibleclose in interface FacetAccessiblepublic FacetIterator iterator()
iterator in interface FacetAccessibleCopyright © 2005–2013. All rights reserved.