org.elasticsearch.search.facet.datehistogram
Class InternalCountDateHistogramFacet

java.lang.Object
  extended by org.elasticsearch.search.facet.datehistogram.InternalDateHistogramFacet
      extended by org.elasticsearch.search.facet.datehistogram.InternalCountDateHistogramFacet
All Implemented Interfaces:
Iterable<DateHistogramFacet.Entry>, Streamable, ToXContent, DateHistogramFacet, Facet, InternalFacet

public class InternalCountDateHistogramFacet
extends InternalDateHistogramFacet


Nested Class Summary
static class InternalCountDateHistogramFacet.CountEntry
          A histogram entry representing a single entry within the result of a histogram facet.
 
Nested classes/interfaces inherited from interface org.elasticsearch.search.facet.datehistogram.DateHistogramFacet
DateHistogramFacet.ComparatorType, DateHistogramFacet.Entry
 
Nested classes/interfaces inherited from interface org.elasticsearch.search.facet.InternalFacet
InternalFacet.Stream, InternalFacet.Streams
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.search.facet.datehistogram.DateHistogramFacet
TYPE
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
InternalCountDateHistogramFacet(String name, DateHistogramFacet.ComparatorType comparatorType, gnu.trove.map.hash.TLongLongHashMap counts, boolean cachedCounts)
           
 
Method Summary
 List<InternalCountDateHistogramFacet.CountEntry> entries()
          An ordered list of histogram facet entries.
 List<InternalCountDateHistogramFacet.CountEntry> getEntries()
          An ordered list of histogram facet entries.
 String getName()
          The "logical" name of the search facet.
 String getType()
          The type of the facet.
 Iterator<DateHistogramFacet.Entry> iterator()
           
 String name()
          The "logical" name of the search facet.
 void readFrom(StreamInput in)
           
static InternalCountDateHistogramFacet readHistogramFacet(StreamInput in)
           
 Facet reduce(String name, List<Facet> facets)
           
static void registerStreams()
           
 String streamType()
           
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 String type()
          The type of the facet.
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalCountDateHistogramFacet

public InternalCountDateHistogramFacet(String name,
                                       DateHistogramFacet.ComparatorType comparatorType,
                                       gnu.trove.map.hash.TLongLongHashMap counts,
                                       boolean cachedCounts)
Method Detail

registerStreams

public static void registerStreams()

streamType

public String streamType()

name

public String name()
Description copied from interface: Facet
The "logical" name of the search facet.


getName

public String getName()
Description copied from interface: Facet
The "logical" name of the search facet.


type

public String type()
Description copied from interface: Facet
The type of the facet.


getType

public String getType()
Description copied from interface: Facet
The type of the facet.


entries

public List<InternalCountDateHistogramFacet.CountEntry> entries()
Description copied from interface: DateHistogramFacet
An ordered list of histogram facet entries.


getEntries

public List<InternalCountDateHistogramFacet.CountEntry> getEntries()
Description copied from interface: DateHistogramFacet
An ordered list of histogram facet entries.


iterator

public Iterator<DateHistogramFacet.Entry> iterator()

reduce

public Facet reduce(String name,
                    List<Facet> facets)
Specified by:
reduce in class InternalDateHistogramFacet

toXContent

public XContentBuilder toXContent(XContentBuilder builder,
                                  ToXContent.Params params)
                           throws IOException
Throws:
IOException

readHistogramFacet

public static InternalCountDateHistogramFacet readHistogramFacet(StreamInput in)
                                                          throws IOException
Throws:
IOException

readFrom

public void readFrom(StreamInput in)
              throws IOException
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.