Class FieldCapabilities
java.lang.Object
org.elasticsearch.action.fieldcaps.FieldCapabilities
- All Implemented Interfaces:
Writeable
,ToXContent
,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
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.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static FieldCapabilities
fromXContent
(String name, XContentParser parser) getName()
The name of the field.getType()
The type of the field.int
hashCode()
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
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.meta()
Return merged metadata across indices.String[]
The list of indices where this field is not aggregatable, or null if the field is aggregatable in all indices.String[]
The list of indices where this field is not searchable, or null if the field is searchable in all indices.toString()
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.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 fieldtype
- 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 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.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
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
The type of the field. -
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
Return merged metadata across indices. -
equals
-
hashCode
public int hashCode() -
toString
-