فهرست منبع

[DOCS] Add runtime_mappings to update datafeed API in HLRC (#71772)

Co-authored-by: David Kyle <david.kyle@elastic.co>
Lisa Cawley 4 سال پیش
والد
کامیت
52c88a763e

+ 3 - 1
client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/MlClientDocumentationIT.java

@@ -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

+ 1 - 1
docs/java-rest/high-level/ml/put-datafeed.asciidoc

@@ -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[]
 

+ 1 - 0
docs/java-rest/high-level/ml/update-datafeed.asciidoc

@@ -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[]