org.elasticsearch.search.facet.datehistogram
Class CountDateHistogramFacetCollector
java.lang.Object
org.apache.lucene.search.Collector
org.elasticsearch.search.facet.FacetCollector
org.elasticsearch.search.facet.AbstractFacetCollector
org.elasticsearch.search.facet.datehistogram.CountDateHistogramFacetCollector
public class CountDateHistogramFacetCollector
- extends AbstractFacetCollector
A date histogram facet collector that uses the same field as the key as well as the
value.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountDateHistogramFacetCollector
public CountDateHistogramFacetCollector(java.lang.String facetName,
java.lang.String fieldName,
org.elasticsearch.common.joda.time.MutableDateTime dateTime,
long interval,
DateHistogramFacet.ComparatorType comparatorType,
SearchContext context)
doCollect
protected void doCollect(int doc)
throws java.io.IOException
- Specified by:
doCollect
in class AbstractFacetCollector
- Throws:
java.io.IOException
doSetNextReader
protected void doSetNextReader(org.apache.lucene.index.IndexReader reader,
int docBase)
throws java.io.IOException
- Specified by:
doSetNextReader
in class AbstractFacetCollector
- Throws:
java.io.IOException
facet
public Facet facet()
- Specified by:
facet
in class FacetCollector
bucket
public static long bucket(long value,
long interval)