Class FieldCapabilities
java.lang.Object
org.elasticsearch.action.fieldcaps.FieldCapabilities
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class FieldCapabilities extends java.lang.Object implements Writeable, org.elasticsearch.common.xcontent.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
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
-
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. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)static FieldCapabilitiesfromXContent(java.lang.String name, org.elasticsearch.common.xcontent.XContentParser parser)java.lang.StringgetName()The name of the field.java.lang.StringgetType()The type of the field.inthashCode()java.lang.String[]indices()The list of indices where this field name is defined astype, or null if all indices have the sametypefor the field.booleanisAggregatable()Whether this field can be aggregated on all indices.booleanisSearchable()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.StringtoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Constructor Details
-
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 fieldtype- 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 astype, or null if all indices have the sametypefor 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
Description copied from interface:WriteableWrite this into the StreamOutput. -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
fromXContent
public static FieldCapabilities fromXContent(java.lang.String name, org.elasticsearch.common.xcontent.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 astype, or null if all indices have the sametypefor 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-