diff --git a/docs/java-api/docs/delete.asciidoc b/docs/java-api/docs/delete.asciidoc index 392132aa129..180eaace09a 100644 --- a/docs/java-api/docs/delete.asciidoc +++ b/docs/java-api/docs/delete.asciidoc @@ -44,7 +44,7 @@ the result of a query: [source,java] -------------------------------------------------- -BulkIndexByScrollResponse response = +BulkByScrollResponse response = DeleteByQueryAction.INSTANCE.newRequestBuilder(client) .filter(QueryBuilders.matchQuery("gender", "male")) <1> .source("persons") <2> diff --git a/docs/java-api/docs/update-by-query.asciidoc b/docs/java-api/docs/update-by-query.asciidoc index 256ed326794..8b3d2d71c40 100644 --- a/docs/java-api/docs/update-by-query.asciidoc +++ b/docs/java-api/docs/update-by-query.asciidoc @@ -12,7 +12,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ updateByQuery.source("source_index").abortOnVersionConflict(false); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- Calls to the `updateByQuery` API start by getting a snapshot of the index, indexing @@ -25,7 +25,7 @@ When the versions match, `updateByQuery` updates the document and increments the version number. All update and query failures cause `updateByQuery` to abort. These failures are -available from the `BulkIndexByScrollResponse#getIndexingFailures` method. Any +available from the `BulkByScrollResponse#getIndexingFailures` method. Any successful updates remain and are not rolled back. While the first failure causes the abort, the response contains all of the failures generated by the failed bulk request. @@ -50,7 +50,7 @@ updateByQuery.source("source_index") .size(1000) .script(new Script("ctx._source.awesome = 'absolutely'", ScriptType.INLINE, "painless", emptyMap())); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- `UpdateByQueryRequestBuilder` also enables direct access to the query used @@ -64,7 +64,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ updateByQuery.source("source_index") .source().setSize(500); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- You can also combine `size` with sorting to limit the documents updated: @@ -76,7 +76,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ updateByQuery.source("source_index").size(100) .source().addSort("cat", SortOrder.DESC); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- In addition to changing the `_source` field for the document, you can use a @@ -95,7 +95,7 @@ updateByQuery.source("source_index") + "} else {" + "ctx._source.awesome = 'absolutely'}", ScriptType.INLINE, "painless", emptyMap())); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- As in the <>, you can set the value of `ctx.op` to change the @@ -129,7 +129,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ updateByQuery.source("foo", "bar").source().setTypes("a", "b"); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- If you provide a `routing` value then the process copies the routing value to the scroll query, @@ -141,7 +141,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ updateByQuery.source().setRouting("cat"); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- `updateByQuery` can also use the <> feature by @@ -153,7 +153,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ updateByQuery.setPipeline("hurray"); -BulkIndexByScrollResponse response = updateByQuery.get(); +BulkByScrollResponse response = updateByQuery.get(); -------------------------------------------------- [float]