Bulk Api support for global parameters (#34528)

Bulk Request in High level rest client should be consistent with what is
possible in Rest API, therefore should support global parameters. Global
parameters are passed in URL in Rest API.

Some parameters are mandatory - index, type - and would fail validation
if not provided before before the bulk is executed.
Optional parameters - routing, pipeline.

The usage of these should be consistent across sync/async execution,
bulk processor and BulkRequestBuilder

closes #26026
This commit is contained in:
Przemyslaw Gomulka 2018-10-30 09:08:12 +01:00 committed by GitHub
parent d67c88fa12
commit 995bf0ee66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 718 additions and 47 deletions

View file

@ -70,6 +70,25 @@ the index/update/delete operations.
`ActiveShardCount.ALL`, `ActiveShardCount.ONE` or
`ActiveShardCount.DEFAULT` (default)
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/CRUDDocumentationIT.java[bulk-request-pipeline]
--------------------------------------------------
<1> Global pipelineId used on all sub requests, unless overridden on a sub request
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/CRUDDocumentationIT.java[bulk-request-routing]
--------------------------------------------------
<1> Global routingId used on all sub requests, unless overridden on a sub request
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/CRUDDocumentationIT.java[bulk-request-index-type]
--------------------------------------------------
<1> A bulk request with global index and type used on all sub requests, unless overridden on a sub request.
Both parameters are @Nullable and can only be set during BulkRequest creation.
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]