Class FieldCapabilities

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

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

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

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.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.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    FieldCapabilities(String name, String type, boolean isMetadataField, boolean isSearchable, boolean isAggregatable, String[] indices, String[] nonSearchableIndices, String[] nonAggregatableIndices, Map<String,Set<String>> meta)
    Constructor for a set of indices.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    fromXContent(String name, org.elasticsearch.xcontent.XContentParser parser)
     
    The name of the field.
    The type of the field.
    int
     
    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
    Whether this field can be aggregated on all indices.
    boolean
    Whether this field is a metadata field.
    boolean
    Whether this field is indexed for search on all indices.
    Return merged metadata across indices.
    The list of indices where this field is not aggregatable, or null if the field is aggregatable in all indices.
    The list of indices where this field is not searchable, or null if the field is searchable in all indices.
     
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    void
    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.xcontent.ToXContentObject

    isFragment
  • Constructor Details

    • FieldCapabilities

      public FieldCapabilities(String name, String type, boolean isMetadataField, boolean isSearchable, boolean isAggregatable, String[] indices, String[] nonSearchableIndices, String[] nonAggregatableIndices, Map<String,Set<String>> meta)
      Constructor for a set of indices.
      Parameters:
      name - The name of the field
      type - The type associated with the field.
      isMetadataField - Whether this field is a metadata 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.
  • Method Details

    • writeTo

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

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static FieldCapabilities fromXContent(String name, org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • getName

      public String getName()
      The name of the field.
    • isMetadataField

      public boolean isMetadataField()
      Whether this field is a metadata 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 String getType()
      The type of the field.
    • indices

      public 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 String[] nonSearchableIndices()
      The list of indices where this field is not searchable, or null if the field is searchable in all indices.
    • nonAggregatableIndices

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

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object