mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
[DOCS] Add runtime_mappings to update datafeed API in HLRC (#71772)
Co-authored-by: David Kyle <david.kyle@elastic.co>
This commit is contained in:
parent
7cca282adf
commit
52c88a763e
3 changed files with 5 additions and 2 deletions
|
@ -772,6 +772,7 @@ public class MlClientDocumentationIT extends ESRestHighLevelClientTestCase {
|
||||||
{
|
{
|
||||||
AggregatorFactories.Builder aggs = AggregatorFactories.builder();
|
AggregatorFactories.Builder aggs = AggregatorFactories.builder();
|
||||||
List<SearchSourceBuilder.ScriptField> scriptFields = Collections.emptyList();
|
List<SearchSourceBuilder.ScriptField> scriptFields = Collections.emptyList();
|
||||||
|
Map<String, Object> runtimeMappings = Collections.emptyMap();
|
||||||
// tag::update-datafeed-config
|
// tag::update-datafeed-config
|
||||||
DatafeedUpdate.Builder datafeedUpdateBuilder = new DatafeedUpdate.Builder(datafeedId) // <1>
|
DatafeedUpdate.Builder datafeedUpdateBuilder = new DatafeedUpdate.Builder(datafeedId) // <1>
|
||||||
.setAggregations(aggs) // <2>
|
.setAggregations(aggs) // <2>
|
||||||
|
@ -781,7 +782,8 @@ public class MlClientDocumentationIT extends ESRestHighLevelClientTestCase {
|
||||||
.setQuery(QueryBuilders.matchAllQuery()) // <6>
|
.setQuery(QueryBuilders.matchAllQuery()) // <6>
|
||||||
.setQueryDelay(TimeValue.timeValueMinutes(1)) // <7>
|
.setQueryDelay(TimeValue.timeValueMinutes(1)) // <7>
|
||||||
.setScriptFields(scriptFields) // <8>
|
.setScriptFields(scriptFields) // <8>
|
||||||
.setScrollSize(1000); // <9>
|
.setScrollSize(1000) // <9>
|
||||||
|
.setRuntimeMappings(runtimeMappings); // <10>
|
||||||
// end::update-datafeed-config
|
// end::update-datafeed-config
|
||||||
|
|
||||||
// Clearing aggregation to avoid complex validation rules
|
// Clearing aggregation to avoid complex validation rules
|
||||||
|
|
|
@ -93,7 +93,7 @@ include-tagged::{doc-tests-file}[{api}-config-set-scroll-size]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
include-tagged::{doc-tests-file}[{api}-config-set-runtime-mappings]
|
include-tagged::{doc-tests-file}[{api}-config-set-runtime-mappings]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
<1> Set the runtime mappings used in the searches.
|
<1> The runtime fields used in the datafeed.
|
||||||
|
|
||||||
include::../execution.asciidoc[]
|
include::../execution.asciidoc[]
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ datafeed runs in real time.
|
||||||
<7> Optional, the time interval behind real time that data is queried.
|
<7> Optional, the time interval behind real time that data is queried.
|
||||||
<8> Optional, allows the use of script fields.
|
<8> Optional, allows the use of script fields.
|
||||||
<9> Optional, the `size` parameter used in the searches.
|
<9> Optional, the `size` parameter used in the searches.
|
||||||
|
<10> Optional, the runtime fields used in the datafeed.
|
||||||
|
|
||||||
include::../execution.asciidoc[]
|
include::../execution.asciidoc[]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue