Class UpdateDatafeedRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<UpdateDatafeedRequest>
- Enclosing class:
- UpdateDatafeedRequest
public static class UpdateDatafeedRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<UpdateDatafeedRequest>
UpdateDatafeedRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description UpdateDatafeedRequest.Builder
aggregations(java.lang.String key, Aggregation value)
If set, the datafeed performs aggregation searches.UpdateDatafeedRequest.Builder
aggregations(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)
If set, the datafeed performs aggregation searches.UpdateDatafeedRequest.Builder
aggregations(java.util.Map<java.lang.String,Aggregation> map)
If set, the datafeed performs aggregation searches.UpdateDatafeedRequest.Builder
allowNoIndices(java.lang.Boolean value)
Iftrue
, wildcard indices expressions that resolve into no concrete indices are ignored.UpdateDatafeedRequest
build()
Builds aUpdateDatafeedRequest
.UpdateDatafeedRequest.Builder
chunkingConfig(ChunkingConfig value)
Datafeeds might search over long time periods, for several months or years.UpdateDatafeedRequest.Builder
chunkingConfig(java.util.function.Function<ChunkingConfig.Builder,ObjectBuilder<ChunkingConfig>> fn)
Datafeeds might search over long time periods, for several months or years.UpdateDatafeedRequest.Builder
datafeedId(java.lang.String value)
Required - A numerical character string that uniquely identifies the datafeed.UpdateDatafeedRequest.Builder
delayedDataCheckConfig(DelayedDataCheckConfig value)
Specifies whether the datafeed checks for missing data and the size of the window.UpdateDatafeedRequest.Builder
delayedDataCheckConfig(java.util.function.Function<DelayedDataCheckConfig.Builder,ObjectBuilder<DelayedDataCheckConfig>> fn)
Specifies whether the datafeed checks for missing data and the size of the window.UpdateDatafeedRequest.Builder
expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Type of index that wildcard patterns can match.UpdateDatafeedRequest.Builder
expandWildcards(java.util.List<ExpandWildcard> list)
Type of index that wildcard patterns can match.UpdateDatafeedRequest.Builder
frequency(Time value)
The interval at which scheduled queries are made while the datafeed runs in real time.UpdateDatafeedRequest.Builder
frequency(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
The interval at which scheduled queries are made while the datafeed runs in real time.UpdateDatafeedRequest.Builder
ignoreThrottled(java.lang.Boolean value)
Deprecated.7.16.0UpdateDatafeedRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
Iftrue
, unavailable indices (missing or closed) are ignored.UpdateDatafeedRequest.Builder
indices(java.lang.String value, java.lang.String... values)
An array of index names.UpdateDatafeedRequest.Builder
indices(java.util.List<java.lang.String> list)
An array of index names.UpdateDatafeedRequest.Builder
indicesOptions(IndicesOptions value)
Specifies index expansion options that are used during search.UpdateDatafeedRequest.Builder
indicesOptions(java.util.function.Function<IndicesOptions.Builder,ObjectBuilder<IndicesOptions>> fn)
Specifies index expansion options that are used during search.UpdateDatafeedRequest.Builder
maxEmptySearches(java.lang.Integer value)
If a real-time datafeed has never seen any data (including during any initial training period), it automatically stops and closes the associated job after this many real-time searches return no documents.UpdateDatafeedRequest.Builder
query(Query value)
The Elasticsearch query domain-specific language (DSL).UpdateDatafeedRequest.Builder
query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)
The Elasticsearch query domain-specific language (DSL).UpdateDatafeedRequest.Builder
queryDelay(Time value)
The number of seconds behind real time that data is queried.UpdateDatafeedRequest.Builder
queryDelay(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
The number of seconds behind real time that data is queried.UpdateDatafeedRequest.Builder
runtimeMappings(java.lang.String key, RuntimeField value)
Specifies runtime fields for the datafeed search.UpdateDatafeedRequest.Builder
runtimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)
Specifies runtime fields for the datafeed search.UpdateDatafeedRequest.Builder
runtimeMappings(java.util.Map<java.lang.String,RuntimeField> map)
Specifies runtime fields for the datafeed search.UpdateDatafeedRequest.Builder
scriptFields(java.lang.String key, ScriptField value)
Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.UpdateDatafeedRequest.Builder
scriptFields(java.lang.String key, java.util.function.Function<ScriptField.Builder,ObjectBuilder<ScriptField>> fn)
Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.UpdateDatafeedRequest.Builder
scriptFields(java.util.Map<java.lang.String,ScriptField> map)
Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.UpdateDatafeedRequest.Builder
scrollSize(java.lang.Integer value)
The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggregations
public final UpdateDatafeedRequest.Builder aggregations(java.util.Map<java.lang.String,Aggregation> map)If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.API name:
aggregations
Adds all entries of
map
toaggregations
. -
aggregations
If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.API name:
aggregations
Adds an entry to
aggregations
. -
aggregations
public final UpdateDatafeedRequest.Builder aggregations(java.lang.String key, java.util.function.Function<Aggregation.Builder,ObjectBuilder<Aggregation>> fn)If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only with low cardinality data.API name:
aggregations
Adds an entry to
aggregations
using a builder lambda. -
allowNoIndices
Iftrue
, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the_all
string or when no indices are specified.API name:
allow_no_indices
-
chunkingConfig
Datafeeds might search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated; it is an advanced configuration option.API name:
chunking_config
-
chunkingConfig
public final UpdateDatafeedRequest.Builder chunkingConfig(java.util.function.Function<ChunkingConfig.Builder,ObjectBuilder<ChunkingConfig>> fn)Datafeeds might search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated; it is an advanced configuration option.API name:
chunking_config
-
datafeedId
Required - A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters.API name:
datafeed_id
-
delayedDataCheckConfig
public final UpdateDatafeedRequest.Builder delayedDataCheckConfig(@Nullable DelayedDataCheckConfig value)Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that thequery_delay
is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds.API name:
delayed_data_check_config
-
delayedDataCheckConfig
public final UpdateDatafeedRequest.Builder delayedDataCheckConfig(java.util.function.Function<DelayedDataCheckConfig.Builder,ObjectBuilder<DelayedDataCheckConfig>> fn)Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally search over indices that have already been read in an effort to determine whether any data has subsequently been added to the index. If missing data is found, it is a good indication that thequery_delay
is set too low and the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time datafeeds.API name:
delayed_data_check_config
-
expandWildcards
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are:all
: Match any data stream or index, including hidden ones.closed
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.hidden
: Match hidden data streams and hidden indices. Must be combined withopen
,closed
, or both.none
: Wildcard patterns are not accepted.open
: Match open, non-hidden indices. Also matches any non-hidden data stream.
API name:
expand_wildcards
Adds all elements of
list
toexpandWildcards
. -
expandWildcards
public final UpdateDatafeedRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values. Valid values are:all
: Match any data stream or index, including hidden ones.closed
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.hidden
: Match hidden data streams and hidden indices. Must be combined withopen
,closed
, or both.none
: Wildcard patterns are not accepted.open
: Match open, non-hidden indices. Also matches any non-hidden data stream.
API name:
expand_wildcards
Adds one or more values to
expandWildcards
. -
frequency
The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. Whenfrequency
is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation.API name:
frequency
-
frequency
public final UpdateDatafeedRequest.Builder frequency(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. Whenfrequency
is shorter than the bucket span, interim results for the last (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value must be divisible by the interval of the date histogram aggregation.API name:
frequency
-
ignoreThrottled
@Deprecated public final UpdateDatafeedRequest.Builder ignoreThrottled(@Nullable java.lang.Boolean value)Deprecated.7.16.0Iftrue
, concrete, expanded or aliased indices are ignored when frozen.API name:
ignore_throttled
-
indices
An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine learning nodes must have theremote_cluster_client
role.API name:
indices
Adds all elements of
list
toindices
. -
indices
public final UpdateDatafeedRequest.Builder indices(java.lang.String value, java.lang.String... values)An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine learning nodes must have theremote_cluster_client
role.API name:
indices
Adds one or more values to
indices
. -
indicesOptions
Specifies index expansion options that are used during search.API name:
indices_options
-
indicesOptions
public final UpdateDatafeedRequest.Builder indicesOptions(java.util.function.Function<IndicesOptions.Builder,ObjectBuilder<IndicesOptions>> fn)Specifies index expansion options that are used during search.API name:
indices_options
-
maxEmptySearches
If a real-time datafeed has never seen any data (including during any initial training period), it automatically stops and closes the associated job after this many real-time searches return no documents. In other words, it stops afterfrequency
timesmax_empty_searches
of real-time operation. If not set, a datafeed with no end time that sees no data remains started until it is explicitly stopped. By default, it is not set.API name:
max_empty_searches
-
query
The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also changed. Therefore, the time required to learn might be long and the understandability of the results is unpredictable. If you want to make significant changes to the source data, it is recommended that you clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one when you are satisfied with the results of the job.API name:
query
-
query
public final UpdateDatafeedRequest.Builder query(java.util.function.Function<Query.Builder,ObjectBuilder<Query>> fn)The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also changed. Therefore, the time required to learn might be long and the understandability of the results is unpredictable. If you want to make significant changes to the source data, it is recommended that you clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one when you are satisfied with the results of the job.API name:
query
-
queryDelay
The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between60s
and120s
. This randomness improves the query performance when there are multiple jobs running on the same node.API name:
query_delay
-
queryDelay
public final UpdateDatafeedRequest.Builder queryDelay(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is randomly selected between60s
and120s
. This randomness improves the query performance when there are multiple jobs running on the same node.API name:
query_delay
-
runtimeMappings
public final UpdateDatafeedRequest.Builder runtimeMappings(java.util.Map<java.lang.String,RuntimeField> map)Specifies runtime fields for the datafeed search.API name:
runtime_mappings
Adds all entries of
map
toruntimeMappings
. -
runtimeMappings
public final UpdateDatafeedRequest.Builder runtimeMappings(java.lang.String key, RuntimeField value)Specifies runtime fields for the datafeed search.API name:
runtime_mappings
Adds an entry to
runtimeMappings
. -
runtimeMappings
public final UpdateDatafeedRequest.Builder runtimeMappings(java.lang.String key, java.util.function.Function<RuntimeField.Builder,ObjectBuilder<RuntimeField>> fn)Specifies runtime fields for the datafeed search.API name:
runtime_mappings
Adds an entry to
runtimeMappings
using a builder lambda. -
scriptFields
public final UpdateDatafeedRequest.Builder scriptFields(java.util.Map<java.lang.String,ScriptField> map)Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields.API name:
script_fields
Adds all entries of
map
toscriptFields
. -
scriptFields
Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields.API name:
script_fields
Adds an entry to
scriptFields
. -
scriptFields
public final UpdateDatafeedRequest.Builder scriptFields(java.lang.String key, java.util.function.Function<ScriptField.Builder,ObjectBuilder<ScriptField>> fn)Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields.API name:
script_fields
Adds an entry to
scriptFields
using a builder lambda. -
scrollSize
The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. The maximum value is the value ofindex.max_result_window
.API name:
scroll_size
-
build
Builds aUpdateDatafeedRequest
.- Specified by:
build
in interfaceObjectBuilder<UpdateDatafeedRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-