public class GeoFacetCountCollector extends Object implements FacetCountCollector
| Modifier and Type | Class and Description |
|---|---|
static class |
GeoFacetCountCollector.GeoRange |
EMPTY_FACET_LIST| Modifier | Constructor and Description |
|---|---|
protected |
GeoFacetCountCollector(String name,
GeoFacetHandler.GeoFacetData dataCache,
int docBase,
FacetSpec fspec,
List<String> predefinedRanges,
boolean miles) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Responsible for release resources used.
|
void |
collect(int docid)
Collect a hit.
|
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.
|
int |
getFacetHitsCount(Object value)
Gets the facet count given a value.
|
List<BrowseFacet> |
getFacets()
Gets gathered top facets
|
String |
getName()
Gets the name of the facet
|
FacetIterator |
iterator()
Returns an iterator to visit all the facets
|
static GeoFacetCountCollector.GeoRange |
parse(String range) |
protected GeoFacetCountCollector(String name, GeoFacetHandler.GeoFacetData dataCache, int docBase, FacetSpec fspec, List<String> predefinedRanges, boolean miles)
name - name of the Geo FacetdataCache - The data cache for the Geo FacetdocBase - the base doc idspec - the facet spec for this facetpredefinedRanges - List of ranges, where each range looks like miles - variable to specify if the geo distance calculations are in miles. False indicates distance calculation is in kilometerspublic void collect(int docid)
FacetCountCollectorcollect in interface FacetCountCollectordocid - The docid for which the facet counts are to be calculatedpublic void collectAll()
FacetCountCollectorcollectAll in interface FacetCountCollectorpublic int[] getCountDistribution()
FacetCountCollectorgetCountDistribution in interface FacetCountCollectorpublic String getName()
FacetCountCollectorgetName in interface FacetCountCollectorpublic BrowseFacet getFacet(String value)
FacetAccessiblegetFacet in interface FacetAccessiblevalue - This value should be one of the user-specified ranges for this Facet Count Collector. Else an
IllegalArgumentException will be raisedpublic int getFacetHitsCount(Object value)
FacetAccessiblegetFacetHitsCount in interface FacetAccessiblevalue - Facet valuepublic List<BrowseFacet> getFacets()
FacetAccessiblegetFacets in interface FacetAccessiblepublic static GeoFacetCountCollector.GeoRange parse(String range)
range - Value should be of the format - lat , lon : radiuspublic void close()
FacetAccessibleclose in interface FacetAccessiblepublic FacetIterator iterator()
FacetAccessibleiterator in interface FacetAccessibleCopyright © 2005–2013. All rights reserved.