Class ChunkingConfig.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.ChunkingConfig.Builder
All Implemented Interfaces:
ObjectBuilder<ChunkingConfig>
Enclosing class:
ChunkingConfig

public static class ChunkingConfig.Builder
extends ObjectBuilderBase
implements ObjectBuilder<ChunkingConfig>
Builder for ChunkingConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • mode

      public final ChunkingConfig.Builder mode​(ChunkingMode value)
      Required - If the mode is auto, the chunk size is dynamically calculated; this is the recommended value when the datafeed does not use aggregations. If the mode is manual, chunking is applied according to the specified time_span; use this mode when the datafeed uses aggregations. If the mode is off, no chunking is applied.

      API name: mode

    • timeSpan

      public final ChunkingConfig.Builder timeSpan​(@Nullable Time value)
      The time span that each search will be querying. This setting is only applicable when the mode is set to manual.

      API name: time_span

    • timeSpan

      public final ChunkingConfig.Builder timeSpan​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      The time span that each search will be querying. This setting is only applicable when the mode is set to manual.

      API name: time_span

    • build

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