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.Params
Nested 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 boolean
equals(java.lang.Object o)
static FieldCapabilities
fromXContent(java.lang.String name, org.elasticsearch.common.xcontent.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 astype
, or null if all indices have the sametype
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()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(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 sametype
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
Description copied from interface:Writeable
Write 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:
toXContent
in 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 sametype
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 classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-