Class DatafeedConfig
java.lang.Object
co.elastic.clients.elasticsearch.ml.DatafeedConfig
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<DatafeedConfig>
Json deserializer forDatafeedConfig
-
Method Summary
Modifier and TypeMethodDescriptionfinal Map<String,
Aggregation> If set, the datafeed performs aggregation searches.final ChunkingConfig
Datafeeds might be required to search over long time periods, for several months or years.final String
A numerical character string that uniquely identifies the datafeed.final DelayedDataCheckConfig
Specifies whether the datafeed checks for missing data and the size of the window.final String
The interval at which scheduled queries are made while the datafeed runs in real time.indexes()
API name:indexes
indices()
Required - An array of index names.final IndicesOptions
Specifies index expansion options that are used during search.final String
jobId()
API name:job_id
final Integer
If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents.static DatafeedConfig
final Query
query()
Required - The Elasticsearch query domain-specific language (DSL).final String
The number of seconds behind real time that data is queried.final Map<String,
RuntimeField> Specifies runtime fields for the datafeed search.final Map<String,
ScriptField> Specifies scripts that evaluate custom expressions and returns script fields to the datafeed.final Integer
The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forDatafeedConfig
-
-
Method Details
-
of
-
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
-
chunkingConfig
Datafeeds might be required to 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 and is an advanced configuration option.API name:
chunking_config
-
datafeedId
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
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
option 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
-
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. For example:150s
. When frequency 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
-
indexes
API name:indexes
-
indices
Required - An array of index names. Wildcards are supported.API name:
indices
-
indicesOptions
Specifies index expansion options that are used during search.API name:
indices_options
-
jobId
API name:job_id
-
maxEmptySearches
If a real-time datafeed has never seen any data (including during any initial training period) then it will automatically stop itself and close its associated job after this many real-time searches that return no documents. In other words, it will stop afterfrequency
timesmax_empty_searches
of real-time operation. If not set then a datafeed with no end time that sees no data will remain started until it is explicitly stopped.API name:
max_empty_searches
-
query
Required - 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.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
-
runtimeMappings
Specifies runtime fields for the datafeed search.API name:
runtime_mappings
-
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
-
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
, which is 10,000 by default.API name:
scroll_size
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupDatafeedConfigDeserializer
protected static void setupDatafeedConfigDeserializer(ObjectDeserializer<DatafeedConfig.Builder> op)
-