Docs: fix response object name
In #22810 I renamed a response object used by reindex and friends but didn't update the java-api documentation that uses it. This makes that update.
This commit is contained in:
parent
0b20a59391
commit
471af48170
|
@ -44,7 +44,7 @@ the result of a query:
|
||||||
|
|
||||||
[source,java]
|
[source,java]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
BulkIndexByScrollResponse response =
|
BulkByScrollResponse response =
|
||||||
DeleteByQueryAction.INSTANCE.newRequestBuilder(client)
|
DeleteByQueryAction.INSTANCE.newRequestBuilder(client)
|
||||||
.filter(QueryBuilders.matchQuery("gender", "male")) <1>
|
.filter(QueryBuilders.matchQuery("gender", "male")) <1>
|
||||||
.source("persons") <2>
|
.source("persons") <2>
|
||||||
|
|
|
@ -12,7 +12,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ
|
||||||
|
|
||||||
updateByQuery.source("source_index").abortOnVersionConflict(false);
|
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
|
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.
|
and increments the version number.
|
||||||
|
|
||||||
All update and query failures cause `updateByQuery` to abort. These failures are
|
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
|
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
|
causes the abort, the response contains all of the failures generated by the
|
||||||
failed bulk request.
|
failed bulk request.
|
||||||
|
@ -50,7 +50,7 @@ updateByQuery.source("source_index")
|
||||||
.size(1000)
|
.size(1000)
|
||||||
.script(new Script("ctx._source.awesome = 'absolutely'", ScriptType.INLINE, "painless", emptyMap()));
|
.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
|
`UpdateByQueryRequestBuilder` also enables direct access to the query used
|
||||||
|
@ -64,7 +64,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ
|
||||||
updateByQuery.source("source_index")
|
updateByQuery.source("source_index")
|
||||||
.source().setSize(500);
|
.source().setSize(500);
|
||||||
|
|
||||||
BulkIndexByScrollResponse response = updateByQuery.get();
|
BulkByScrollResponse response = updateByQuery.get();
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
You can also combine `size` with sorting to limit the documents updated:
|
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)
|
updateByQuery.source("source_index").size(100)
|
||||||
.source().addSort("cat", SortOrder.DESC);
|
.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
|
In addition to changing the `_source` field for the document, you can use a
|
||||||
|
@ -95,7 +95,7 @@ updateByQuery.source("source_index")
|
||||||
+ "} else {"
|
+ "} else {"
|
||||||
+ "ctx._source.awesome = 'absolutely'}", ScriptType.INLINE, "painless", emptyMap()));
|
+ "ctx._source.awesome = 'absolutely'}", ScriptType.INLINE, "painless", emptyMap()));
|
||||||
|
|
||||||
BulkIndexByScrollResponse response = updateByQuery.get();
|
BulkByScrollResponse response = updateByQuery.get();
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
As in the <<docs-update,Update API>>, you can set the value of `ctx.op` to change the
|
As in the <<docs-update,Update API>>, 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");
|
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,
|
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");
|
updateByQuery.source().setRouting("cat");
|
||||||
|
|
||||||
BulkIndexByScrollResponse response = updateByQuery.get();
|
BulkByScrollResponse response = updateByQuery.get();
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
`updateByQuery` can also use the <<ingest>> feature by
|
`updateByQuery` can also use the <<ingest>> feature by
|
||||||
|
@ -153,7 +153,7 @@ UpdateByQueryRequestBuilder updateByQuery = UpdateByQueryAction.INSTANCE.newRequ
|
||||||
|
|
||||||
updateByQuery.setPipeline("hurray");
|
updateByQuery.setPipeline("hurray");
|
||||||
|
|
||||||
BulkIndexByScrollResponse response = updateByQuery.get();
|
BulkByScrollResponse response = updateByQuery.get();
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
|
|
Loading…
Reference in New Issue