org.elasticsearch.search.facet.geodistance
Class GeoDistanceFacetCollector

java.lang.Object
  extended by org.apache.lucene.search.Collector
      extended by org.elasticsearch.search.facet.FacetCollector
          extended by org.elasticsearch.search.facet.AbstractFacetCollector
              extended by org.elasticsearch.search.facet.geodistance.GeoDistanceFacetCollector
Direct Known Subclasses:
ScriptGeoDistanceFacetCollector, ValueGeoDistanceFacetCollector

public class GeoDistanceFacetCollector
extends AbstractFacetCollector


Nested Class Summary
static class GeoDistanceFacetCollector.Aggregator
           
 
Field Summary
protected  GeoPointFieldData.ValueInDocProc aggregator
           
protected  GeoDistanceFacet.Entry[] entries
           
protected  GeoPointFieldData fieldData
           
protected  FieldDataCache fieldDataCache
           
protected  GeoDistance.FixedSourceDistance fixedSourceDistance
           
protected  GeoDistance geoDistance
           
protected  String indexFieldName
           
protected  double lat
           
protected  double lon
           
protected  DistanceUnit unit
           
 
Fields inherited from class org.elasticsearch.search.facet.AbstractFacetCollector
facetName, filter
 
Constructor Summary
GeoDistanceFacetCollector(String facetName, String fieldName, double lat, double lon, DistanceUnit unit, GeoDistance geoDistance, GeoDistanceFacet.Entry[] entries, SearchContext context)
           
 
Method Summary
protected  void doCollect(int doc)
           
protected  void doSetNextReader(org.apache.lucene.index.IndexReader reader, int docBase)
           
 Facet facet()
           
 
Methods inherited from class org.elasticsearch.search.facet.AbstractFacetCollector
acceptsDocsOutOfOrder, collect, getAndClearFilter, getFilter, setFilter, setNextReader, setScorer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indexFieldName

protected final String indexFieldName

lat

protected final double lat

lon

protected final double lon

unit

protected final DistanceUnit unit

geoDistance

protected final GeoDistance geoDistance

fixedSourceDistance

protected final GeoDistance.FixedSourceDistance fixedSourceDistance

fieldDataCache

protected final FieldDataCache fieldDataCache

fieldData

protected GeoPointFieldData fieldData

entries

protected final GeoDistanceFacet.Entry[] entries

aggregator

protected GeoPointFieldData.ValueInDocProc aggregator
Constructor Detail

GeoDistanceFacetCollector

public GeoDistanceFacetCollector(String facetName,
                                 String fieldName,
                                 double lat,
                                 double lon,
                                 DistanceUnit unit,
                                 GeoDistance geoDistance,
                                 GeoDistanceFacet.Entry[] entries,
                                 SearchContext context)
Method Detail

doSetNextReader

protected void doSetNextReader(org.apache.lucene.index.IndexReader reader,
                               int docBase)
                        throws IOException
Specified by:
doSetNextReader in class AbstractFacetCollector
Throws:
IOException

doCollect

protected void doCollect(int doc)
                  throws IOException
Specified by:
doCollect in class AbstractFacetCollector
Throws:
IOException

facet

public Facet facet()
Specified by:
facet in class FacetCollector


Copyright © 2009-2012. All Rights Reserved.