Class Source.Builder

java.lang.Object
All Implemented Interfaces:
WithJson<Source.Builder>, ObjectBuilder<Source>
Enclosing class:
Source

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

    • Builder

      public Builder()
  • Method Details

    • index

      public final Source.Builder index​(java.util.List<java.lang.String> list)
      Required - The source indices for the transform. It can be a single index, an index pattern (for example, "my-index-*""), an array of indices (for example, ["my-index-000001", "my-index-000002"]), or an array of index patterns (for example, ["my-index-*", "my-other-index-*"]. For remote indices use the syntax "remote_name:index_name". If any indices are in remote clusters then the master node and at least one transform node must have the remote_cluster_client node role.

      API name: index

      Adds all elements of list to index.

    • index

      public final Source.Builder index​(java.lang.String value, java.lang.String... values)
      Required - The source indices for the transform. It can be a single index, an index pattern (for example, "my-index-*""), an array of indices (for example, ["my-index-000001", "my-index-000002"]), or an array of index patterns (for example, ["my-index-*", "my-other-index-*"]. For remote indices use the syntax "remote_name:index_name". If any indices are in remote clusters then the master node and at least one transform node must have the remote_cluster_client node role.

      API name: index

      Adds one or more values to index.

    • query

      public final Source.Builder query​(@Nullable Query value)
      A query clause that retrieves a subset of data from the source index.

      API name: query

    • query

      public final Source.Builder query​(java.util.function.Function<Query.Builder,​ObjectBuilder<Query>> fn)
      A query clause that retrieves a subset of data from the source index.

      API name: query

    • runtimeMappings

      public final Source.Builder runtimeMappings​(java.util.Map<java.lang.String,​RuntimeField> map)
      Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data nodes, including remote nodes, must be 7.12 or later.

      API name: runtime_mappings

      Adds all entries of map to runtimeMappings.

    • runtimeMappings

      public final Source.Builder runtimeMappings​(java.lang.String key, RuntimeField value)
      Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data nodes, including remote nodes, must be 7.12 or later.

      API name: runtime_mappings

      Adds an entry to runtimeMappings.

    • runtimeMappings

      public final Source.Builder runtimeMappings​(java.lang.String key, java.util.function.Function<RuntimeField.Builder,​ObjectBuilder<RuntimeField>> fn)
      Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data nodes, including remote nodes, must be 7.12 or later.

      API name: runtime_mappings

      Adds an entry to runtimeMappings using a builder lambda.

    • self

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

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