[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:
Lisa Cawley 2021-04-22 08:22:13 -07:00 committed by GitHub
parent 7cca282adf
commit 52c88a763e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -772,6 +772,7 @@ public class MlClientDocumentationIT extends ESRestHighLevelClientTestCase {
{
AggregatorFactories.Builder aggs = AggregatorFactories.builder();
List<SearchSourceBuilder.ScriptField> scriptFields = Collections.emptyList();
Map<String, Object> runtimeMappings = Collections.emptyMap();
// tag::update-datafeed-config
DatafeedUpdate.Builder datafeedUpdateBuilder = new DatafeedUpdate.Builder(datafeedId) // <1>
.setAggregations(aggs) // <2>
@ -781,7 +782,8 @@ public class MlClientDocumentationIT extends ESRestHighLevelClientTestCase {
.setQuery(QueryBuilders.matchAllQuery()) // <6>
.setQueryDelay(TimeValue.timeValueMinutes(1)) // <7>
.setScriptFields(scriptFields) // <8>
.setScrollSize(1000); // <9>
.setScrollSize(1000) // <9>
.setRuntimeMappings(runtimeMappings); // <10>
// end::update-datafeed-config
// Clearing aggregation to avoid complex validation rules

View file

@ -93,7 +93,7 @@ include-tagged::{doc-tests-file}[{api}-config-set-scroll-size]
--------------------------------------------------
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[]

View file

@ -43,6 +43,7 @@ datafeed runs in real time.
<7> Optional, the time interval behind real time that data is queried.
<8> Optional, allows the use of script fields.
<9> Optional, the `size` parameter used in the searches.
<10> Optional, the runtime fields used in the datafeed.
include::../execution.asciidoc[]