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
FieldsModifier and TypeFieldDescriptionstatic final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
static final ParseField
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionFieldCapabilities
(String name, String type, boolean isMetadataField, boolean isSearchable, boolean isAggregatable, boolean isDimension, TimeSeriesParams.MetricType metricType, String[] indices, String[] nonSearchableIndices, String[] nonAggregatableIndices, String[] nonDimensionIndices, String[] metricConflictsIndices, Map<String, Set<String>> meta) Constructor for a set of indices.FieldCapabilities
(String name, String type, boolean isMetadataField, boolean isSearchable, boolean isAggregatable, String[] indices, String[] nonSearchableIndices, String[] nonAggregatableIndices, Map<String, Set<String>> meta) Constructor for non-timeseries field caps.FieldCapabilities
(String name, String type, Boolean isMetadataField, boolean isSearchable, boolean isAggregatable, Boolean isDimension, String metricType, List<String> indices, List<String> nonSearchableIndices, List<String> nonAggregatableIndices, List<String> nonDimensionIndices, List<String> metricConflictsIndices, Map<String, Set<String>> meta) Constructor for a set of indices used by parser -
Method Summary
Modifier and TypeMethodDescriptionboolean
The metric typegetName()
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 dimension in any 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 has different dimension or metric flagString[]
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 has different dimension or metric flagString[]
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
-
Field Details
-
TYPE_FIELD
-
IS_METADATA_FIELD
-
SEARCHABLE_FIELD
-
AGGREGATABLE_FIELD
-
TIME_SERIES_DIMENSION_FIELD
-
TIME_SERIES_METRIC_FIELD
-
INDICES_FIELD
-
NON_SEARCHABLE_INDICES_FIELD
-
NON_AGGREGATABLE_INDICES_FIELD
-
NON_DIMENSION_INDICES_FIELD
-
METRIC_CONFLICTS_INDICES_FIELD
-
-
Constructor Details
-
FieldCapabilities
public FieldCapabilities(String name, String type, boolean isMetadataField, boolean isSearchable, boolean isAggregatable, boolean isDimension, TimeSeriesParams.MetricType metricType, String[] indices, String[] nonSearchableIndices, String[] nonAggregatableIndices, String[] nonDimensionIndices, String[] metricConflictsIndices, 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.isDimension
- Whether this field can be used as dimensionmetricType
- If this field is a metric field, returns the metric's type or null for non-metrics fieldsindices
- 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.nonDimensionIndices
- The list of indices where this field is not a dimensionmetricConflictsIndices
- The list of indices where this field is has different metric types or not mark as a metricmeta
- Merged metadata across indices.
-
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 non-timeseries field caps. Useful for testing 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.
-
FieldCapabilities
public FieldCapabilities(String name, String type, Boolean isMetadataField, boolean isSearchable, boolean isAggregatable, Boolean isDimension, String metricType, List<String> indices, List<String> nonSearchableIndices, List<String> nonAggregatableIndices, List<String> nonDimensionIndices, List<String> metricConflictsIndices, Map<String, Set<String>> meta) Constructor for a set of indices used by parser- 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.isDimension
- Whether this field can be used as dimensionmetricType
- If this field is a metric field, returns the metric's type or null for non-metrics fieldsindices
- 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.nonDimensionIndices
- The list of indices where this field is not a dimensionmetricConflictsIndices
- The list of indices where this field is has different metric types or not mark as a metricmeta
- 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
-
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. -
isDimension
public boolean isDimension()Whether this field is a dimension in any indices. -
getMetricType
The metric type -
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. -
nonDimensionIndices
The list of indices where this field has different dimension or metric flag -
metricConflictsIndices
The list of indices where this field has different dimension or metric flag -
meta
Return merged metadata across indices. -
equals
-
hashCode
public int hashCode() -
toString
-