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:
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(String name, TermsFacet.ComparatorType comparatorType, int requiredSize, Collection<InternalStringTermsFacet.StringEntry> entries, long missing, long total)
           
 
Method Summary
 List<InternalStringTermsFacet.StringEntry> entries()
          The terms and counts.
 List<InternalStringTermsFacet.StringEntry> getEntries()
          The terms and counts.
 long getMissingCount()
          The number of docs missing a value.
 String getName()
          The "logical" name of the search facet.
 long getOtherCount()
          The count of terms other than the one provided by the entries.
 long getTotalCount()
          The total count of terms.
 String getType()
          The type of the facet.
 Iterator<TermsFacet.Entry> iterator()
           
 long missingCount()
          The number of docs missing a value.
 String name()
          The "logical" name of the search facet.
 long otherCount()
          The count of terms other than the one provided by the entries.
 void readFrom(StreamInput in)
           
static InternalStringTermsFacet readTermsFacet(StreamInput in)
           
 Facet reduce(String name, List<Facet> facets)
           
static void registerStream()
           
 String streamType()
           
 long totalCount()
          The total count of terms.
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 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(String name,
                                TermsFacet.ComparatorType comparatorType,
                                int requiredSize,
                                Collection<InternalStringTermsFacet.StringEntry> entries,
                                long missing,
                                long total)
Method Detail

registerStream

public static void registerStream()

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


getEntries

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


iterator

public 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.


totalCount

public long totalCount()
Description copied from interface: TermsFacet
The total count of terms.


getTotalCount

public long getTotalCount()
Description copied from interface: TermsFacet
The total count of terms.


otherCount

public long otherCount()
Description copied from interface: TermsFacet
The count of terms other than the one provided by the entries.


getOtherCount

public long getOtherCount()
Description copied from interface: TermsFacet
The count of terms other than the one provided by the entries.


reduce

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

toXContent

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

readTermsFacet

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