org.elasticsearch.search.facet.terms.strings
Class InternalStringTermsFacet

java.lang.Object
  extended by org.elasticsearch.search.facet.terms.InternalTermsFacet
      extended by org.elasticsearch.search.facet.terms.strings.InternalStringTermsFacet
All Implemented Interfaces:
java.lang.Iterable<TermsFacet.Entry>, Streamable, ToXContent, Facet, InternalFacet, TermsFacet

public class InternalStringTermsFacet
extends InternalTermsFacet


Nested Class Summary
static class InternalStringTermsFacet.StringEntry
           
 
Nested classes/interfaces inherited from interface org.elasticsearch.search.facet.terms.TermsFacet
TermsFacet.ComparatorType, TermsFacet.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.terms.TermsFacet
TYPE
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
InternalStringTermsFacet(java.lang.String name, TermsFacet.ComparatorType comparatorType, int requiredSize, java.util.Collection<InternalStringTermsFacet.StringEntry> entries, long missing)
           
 
Method Summary
 java.util.List<InternalStringTermsFacet.StringEntry> entries()
          The terms and counts.
 java.util.List<InternalStringTermsFacet.StringEntry> getEntries()
          The terms and counts.
 long getMissingCount()
          The number of docs missing a value.
 java.lang.String getName()
          The "logical" name of the search facet.
 java.lang.String getType()
          The type of the facet.
 java.util.Iterator<TermsFacet.Entry> iterator()
           
 long missingCount()
          The number of docs missing a value.
 java.lang.String name()
          The "logical" name of the search facet.
 void readFrom(StreamInput in)
           
static InternalStringTermsFacet readTermsFacet(StreamInput in)
           
 Facet reduce(java.lang.String name, java.util.List<Facet> facets)
           
static void registerStream()
           
 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 org.elasticsearch.search.facet.terms.InternalTermsFacet
registerStreams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalStringTermsFacet

public InternalStringTermsFacet(java.lang.String name,
                                TermsFacet.ComparatorType comparatorType,
                                int requiredSize,
                                java.util.Collection<InternalStringTermsFacet.StringEntry> entries,
                                long missing)
Method Detail

registerStream

public static void registerStream()

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<InternalStringTermsFacet.StringEntry> entries()
Description copied from interface: TermsFacet
The terms and counts.


getEntries

public java.util.List<InternalStringTermsFacet.StringEntry> getEntries()
Description copied from interface: TermsFacet
The terms and counts.


iterator

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

missingCount

public long missingCount()
Description copied from interface: TermsFacet
The number of docs missing a value.


getMissingCount

public long getMissingCount()
Description copied from interface: TermsFacet
The number of docs missing a value.


reduce

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

toXContent

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

readTermsFacet

public static InternalStringTermsFacet readTermsFacet(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