org.elasticsearch.search.facet.histogram.bounded
Class InternalBoundedCountHistogramFacet

java.lang.Object
  extended by org.elasticsearch.search.facet.histogram.InternalHistogramFacet
      extended by org.elasticsearch.search.facet.histogram.bounded.InternalBoundedCountHistogramFacet
All Implemented Interfaces:
java.lang.Iterable<HistogramFacet.Entry>, Streamable, ToXContent, Facet, HistogramFacet, InternalFacet

public class InternalBoundedCountHistogramFacet
extends InternalHistogramFacet


Nested Class Summary
static class InternalBoundedCountHistogramFacet.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.histogram.HistogramFacet
HistogramFacet.ComparatorType, HistogramFacet.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.histogram.HistogramFacet
TYPE
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
InternalBoundedCountHistogramFacet(java.lang.String name, HistogramFacet.ComparatorType comparatorType, long interval, long offset, int size, int[] counts, boolean cachedCounts)
           
 
Method Summary
 java.util.List<InternalBoundedCountHistogramFacet.CountEntry> entries()
          An ordered list of histogram facet entries.
 java.util.List<InternalBoundedCountHistogramFacet.CountEntry> getEntries()
          An ordered list of histogram facet entries.
 java.lang.String getName()
          The "logical" name of the search facet.
 java.lang.String getType()
          The type of the facet.
 java.util.Iterator<HistogramFacet.Entry> iterator()
           
 java.lang.String name()
          The "logical" name of the search facet.
 void readFrom(StreamInput in)
           
static InternalBoundedCountHistogramFacet readHistogramFacet(StreamInput in)
           
 Facet reduce(java.lang.String name, java.util.List<Facet> facets)
           
static void registerStreams()
           
 java.lang.String streamType()
           
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 java.lang.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

InternalBoundedCountHistogramFacet

public InternalBoundedCountHistogramFacet(java.lang.String name,
                                          HistogramFacet.ComparatorType comparatorType,
                                          long interval,
                                          long offset,
                                          int size,
                                          int[] counts,
                                          boolean cachedCounts)
Method Detail

registerStreams

public static void registerStreams()

streamType

public java.lang.String streamType()

name

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


getName

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


type

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


getType

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


entries

public java.util.List<InternalBoundedCountHistogramFacet.CountEntry> entries()
Description copied from interface: HistogramFacet
An ordered list of histogram facet entries.


getEntries

public java.util.List<InternalBoundedCountHistogramFacet.CountEntry> getEntries()
Description copied from interface: HistogramFacet
An ordered list of histogram facet entries.


iterator

public java.util.Iterator<HistogramFacet.Entry> iterator()

reduce

public Facet reduce(java.lang.String name,
                    java.util.List<Facet> facets)
Specified by:
reduce in class InternalHistogramFacet

toXContent

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

readHistogramFacet

public static InternalBoundedCountHistogramFacet readHistogramFacet(StreamInput in)
                                                             throws java.io.IOException
Throws:
java.io.IOException

readFrom

public void readFrom(StreamInput in)
              throws java.io.IOException
Throws:
java.io.IOException

writeTo

public void writeTo(StreamOutput out)
             throws java.io.IOException
Throws:
java.io.IOException