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)
ConstructorFieldCapabilities(java.lang.String name, java.lang.String type, boolean isSearchable, boolean isAggregatable, java.lang.String[] indices, java.lang.String[] nonSearchableIndices, java.lang.String[] nonAggregatableIndices)
ConstructorFieldCapabilities(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 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.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.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, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
FieldCapabilities
public FieldCapabilities(java.lang.String name, java.lang.String type, boolean isSearchable, boolean isAggregatable)
Constructor- 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.
-
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)
Constructor- 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.
-
FieldCapabilities
public FieldCapabilities(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- 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 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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-