Class FieldCapabilities

java.lang.Object
org.elasticsearch.action.fieldcaps.FieldCapabilities
All Implemented Interfaces:
Writeable, ToXContent, ToXContentObject

public class FieldCapabilities
extends java.lang.Object
implements Writeable, ToXContentObject
Describes the capabilities of a field optionally merged across multiple indices.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors 
    Constructor Description
    FieldCapabilities​(java.lang.String name, java.lang.String type, boolean isSearchable, boolean isAggregatable, java.lang.String[] indices, java.lang.String[] nonSearchableIndices, java.lang.String[] nonAggregatableIndices, java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> meta)
    Constructor for a set of indices.
    FieldCapabilities​(java.lang.String name, java.lang.String type, boolean isSearchable, boolean isAggregatable, java.util.Map<java.lang.String,​java.lang.String> meta)
    Constructor for a single index.
    FieldCapabilities​(StreamInput in)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    static FieldCapabilities fromXContent​(java.lang.String name, XContentParser parser)  
    java.lang.String getName()
    The name of the field.
    java.lang.String getType()
    The type of the field.
    int hashCode()  
    java.lang.String[] indices()
    The list of indices where this field name is defined as type, or null if all indices have the same type for the field.
    boolean isAggregatable()
    Whether this field can be aggregated on all indices.
    boolean isSearchable()
    Whether this field is indexed for search on all indices.
    java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> meta()
    Return merged metadata across indices.
    java.lang.String[] nonAggregatableIndices()
    The list of indices where this field is not aggregatable, or null if the field is aggregatable in all indices.
    java.lang.String[] nonSearchableIndices()
    The list of indices where this field is not searchable, or null if the field is searchable in all indices.
    java.lang.String toString()  
    XContentBuilder toXContent​(XContentBuilder builder, ToXContent.Params params)  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Constructor Details

    • FieldCapabilities

      public FieldCapabilities​(java.lang.String name, java.lang.String type, boolean isSearchable, boolean isAggregatable, java.util.Map<java.lang.String,​java.lang.String> meta)
      Constructor for a single index.
      Parameters:
      name - The name of the field.
      type - The type associated with the field.
      isSearchable - Whether this field is indexed for search.
      isAggregatable - Whether this field can be aggregated on.
      meta - Metadata about the field.
    • FieldCapabilities

      public FieldCapabilities​(java.lang.String name, java.lang.String type, boolean isSearchable, boolean isAggregatable, java.lang.String[] indices, java.lang.String[] nonSearchableIndices, java.lang.String[] nonAggregatableIndices, java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> meta)
      Constructor for a set of indices.
      Parameters:
      name - The name of the field
      type - The type associated with the field.
      isSearchable - Whether this field is indexed for search.
      isAggregatable - Whether this field can be aggregated on.
      indices - The list of indices where this field name is defined as type, or null if all indices have the same type for the field.
      nonSearchableIndices - The list of indices where this field is not searchable, or null if the field is searchable in all indices.
      nonAggregatableIndices - The list of indices where this field is not aggregatable, or null if the field is aggregatable in all indices.
      meta - Merged metadata across indices.
    • FieldCapabilities

      public FieldCapabilities​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • toXContent

      public XContentBuilder toXContent​(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      java.io.IOException
    • fromXContent

      public static FieldCapabilities fromXContent​(java.lang.String name, XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • getName

      public java.lang.String getName()
      The name of the field.
    • isAggregatable

      public boolean isAggregatable()
      Whether this field can be aggregated on all indices.
    • isSearchable

      public boolean isSearchable()
      Whether this field is indexed for search on all indices.
    • getType

      public java.lang.String getType()
      The type of the field.
    • indices

      public java.lang.String[] indices()
      The list of indices where this field name is defined as type, or null if all indices have the same type for the field.
    • nonSearchableIndices

      public java.lang.String[] nonSearchableIndices()
      The list of indices where this field is not searchable, or null if the field is searchable in all indices.
    • nonAggregatableIndices

      public java.lang.String[] nonAggregatableIndices()
      The list of indices where this field is not aggregatable, or null if the field is aggregatable in all indices.
    • meta

      public java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> meta()
      Return merged metadata across indices.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object