Class FieldCapability.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<FieldCapability.Builder>
co.elastic.clients.elasticsearch.core.field_caps.FieldCapability.Builder
All Implemented Interfaces:
WithJson<FieldCapability.Builder>, ObjectBuilder<FieldCapability>
Enclosing class:
FieldCapability

public static class FieldCapability.Builder
extends WithJsonObjectBuilderBase<FieldCapability.Builder>
implements ObjectBuilder<FieldCapability>
Builder for FieldCapability.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • aggregatable

      public final FieldCapability.Builder aggregatable​(boolean value)
      Required - Whether this field can be aggregated on all indices.

      API name: aggregatable

    • indices

      public final FieldCapability.Builder indices​(java.util.List<java.lang.String> list)
      The list of indices where this field has the same type family, or null if all indices have the same type family for the field.

      API name: indices

      Adds all elements of list to indices.

    • indices

      public final FieldCapability.Builder indices​(java.lang.String value, java.lang.String... values)
      The list of indices where this field has the same type family, or null if all indices have the same type family for the field.

      API name: indices

      Adds one or more values to indices.

    • meta

      public final FieldCapability.Builder meta​(java.util.Map<java.lang.String,​JsonData> map)
      Merged metadata across all indices as a map of string keys to arrays of values. A value length of 1 indicates that all indices had the same value for this key, while a length of 2 or more indicates that not all indices had the same value for this key.

      API name: meta

      Adds all entries of map to meta.

    • meta

      public final FieldCapability.Builder meta​(java.lang.String key, JsonData value)
      Merged metadata across all indices as a map of string keys to arrays of values. A value length of 1 indicates that all indices had the same value for this key, while a length of 2 or more indicates that not all indices had the same value for this key.

      API name: meta

      Adds an entry to meta.

    • nonAggregatableIndices

      public final FieldCapability.Builder nonAggregatableIndices​(java.util.List<java.lang.String> list)
      The list of indices where this field is not aggregatable, or null if all indices have the same definition for the field.

      API name: non_aggregatable_indices

      Adds all elements of list to nonAggregatableIndices.

    • nonAggregatableIndices

      public final FieldCapability.Builder nonAggregatableIndices​(java.lang.String value, java.lang.String... values)
      The list of indices where this field is not aggregatable, or null if all indices have the same definition for the field.

      API name: non_aggregatable_indices

      Adds one or more values to nonAggregatableIndices.

    • nonSearchableIndices

      public final FieldCapability.Builder nonSearchableIndices​(java.util.List<java.lang.String> list)
      The list of indices where this field is not searchable, or null if all indices have the same definition for the field.

      API name: non_searchable_indices

      Adds all elements of list to nonSearchableIndices.

    • nonSearchableIndices

      public final FieldCapability.Builder nonSearchableIndices​(java.lang.String value, java.lang.String... values)
      The list of indices where this field is not searchable, or null if all indices have the same definition for the field.

      API name: non_searchable_indices

      Adds one or more values to nonSearchableIndices.

    • searchable

      public final FieldCapability.Builder searchable​(boolean value)
      Required - Whether this field is indexed for search on all indices.

      API name: searchable

    • type

      public final FieldCapability.Builder type​(java.lang.String value)
      Required - API name: type
    • metadataField

      public final FieldCapability.Builder metadataField​(@Nullable java.lang.Boolean value)
      Whether this field is registered as a metadata field.

      API name: metadata_field

    • timeSeriesDimension

      public final FieldCapability.Builder timeSeriesDimension​(@Nullable java.lang.Boolean value)
      Whether this field is used as a time series dimension.

      API name: time_series_dimension

    • timeSeriesMetric

      public final FieldCapability.Builder timeSeriesMetric​(@Nullable TimeSeriesMetricType value)
      Contains metric type if this fields is used as a time series metrics, absent if the field is not used as metric.

      API name: time_series_metric

    • nonDimensionIndices

      public final FieldCapability.Builder nonDimensionIndices​(java.util.List<java.lang.String> list)
      If this list is present in response then some indices have the field marked as a dimension and other indices, the ones in this list, do not.

      API name: non_dimension_indices

      Adds all elements of list to nonDimensionIndices.

    • nonDimensionIndices

      public final FieldCapability.Builder nonDimensionIndices​(java.lang.String value, java.lang.String... values)
      If this list is present in response then some indices have the field marked as a dimension and other indices, the ones in this list, do not.

      API name: non_dimension_indices

      Adds one or more values to nonDimensionIndices.

    • metricConflictsIndices

      public final FieldCapability.Builder metricConflictsIndices​(java.util.List<java.lang.String> list)
      The list of indices where this field is present if these indices don’t have the same time_series_metric value for this field.

      API name: metric_conflicts_indices

      Adds all elements of list to metricConflictsIndices.

    • metricConflictsIndices

      public final FieldCapability.Builder metricConflictsIndices​(java.lang.String value, java.lang.String... values)
      The list of indices where this field is present if these indices don’t have the same time_series_metric value for this field.

      API name: metric_conflicts_indices

      Adds one or more values to metricConflictsIndices.

    • self

      protected FieldCapability.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<FieldCapability.Builder>
    • build

      public FieldCapability build()
      Builds a FieldCapability.
      Specified by:
      build in interface ObjectBuilder<FieldCapability>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.