diff --git a/client/rest-high-level/build.gradle b/client/rest-high-level/build.gradle index bfe7c3d956cd2..1a41a49358647 100644 --- a/client/rest-high-level/build.gradle +++ b/client/rest-high-level/build.gradle @@ -85,6 +85,7 @@ integTestRunner { } integTestCluster { + systemProperty 'es.scripting.update.ctx_in_params', 'false' setting 'xpack.license.self_generated.type', 'trial' setting 'xpack.security.enabled', 'true' // Truststore settings are not used since TLS is not enabled. Included for testing the get certificates API diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java index 79d2ccacf6124..4e3f778cd151b 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/CRUDDocumentationIT.java @@ -280,7 +280,7 @@ public void testUpdate() throws Exception { .startObject() .startObject("script") .field("lang", "painless") - .field("code", "ctx._source.field += params.count") + .field("source", "ctx._source.field += params.count") .endObject() .endObject())); Response response = client().performRequest(request); @@ -991,10 +991,9 @@ public void testUpdateByQuery() throws Exception { // tag::update-by-query-request-conflicts request.setConflicts("proceed"); // <1> // end::update-by-query-request-conflicts - // tag::update-by-query-request-typeOrQuery - request.setDocTypes("doc"); // <1> - request.setQuery(new TermQueryBuilder("user", "kimchy")); // <2> - // end::update-by-query-request-typeOrQuery + // tag::update-by-query-request-query + request.setQuery(new TermQueryBuilder("user", "kimchy")); // <1> + // end::update-by-query-request-query // tag::update-by-query-request-size request.setSize(10); // <1> // end::update-by-query-request-size @@ -1110,10 +1109,9 @@ public void testDeleteByQuery() throws Exception { // tag::delete-by-query-request-conflicts request.setConflicts("proceed"); // <1> // end::delete-by-query-request-conflicts - // tag::delete-by-query-request-typeOrQuery - request.setDocTypes("doc"); // <1> - request.setQuery(new TermQueryBuilder("user", "kimchy")); // <2> - // end::delete-by-query-request-typeOrQuery + // tag::delete-by-query-request-query + request.setQuery(new TermQueryBuilder("user", "kimchy")); // <1> + // end::delete-by-query-request-query // tag::delete-by-query-request-size request.setSize(10); // <1> // end::delete-by-query-request-size diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java index 4382924bb97e9..1e596158750fa 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SearchDocumentationIT.java @@ -140,10 +140,9 @@ public void testSearch() throws Exception { // end::search-request-basic } { - // tag::search-request-indices-types + // tag::search-request-indices SearchRequest searchRequest = new SearchRequest("posts"); // <1> - searchRequest.types("doc"); // <2> - // end::search-request-indices-types + // end::search-request-indices // tag::search-request-routing searchRequest.routing("routing"); // <1> // end::search-request-routing diff --git a/docs/java-rest/high-level/document/delete-by-query.asciidoc b/docs/java-rest/high-level/document/delete-by-query.asciidoc index 5ec246a9121ec..3a4c8a15deae6 100644 --- a/docs/java-rest/high-level/document/delete-by-query.asciidoc +++ b/docs/java-rest/high-level/document/delete-by-query.asciidoc @@ -24,14 +24,13 @@ include-tagged::{doc-tests}/CRUDDocumentationIT.java[delete-by-query-request-con -------------------------------------------------- <1> Set `proceed` on version conflict -You can limit the documents by adding a type to the source or by adding a query. +You can limit the documents by adding a query. ["source","java",subs="attributes,callouts,macros"] -------------------------------------------------- -include-tagged::{doc-tests}/CRUDDocumentationIT.java[delete-by-query-request-typeOrQuery] +include-tagged::{doc-tests}/CRUDDocumentationIT.java[delete-by-query-request-query] -------------------------------------------------- -<1> Only copy `doc` type -<2> Only copy documents which have field `user` set to `kimchy` +<1> Only copy documents which have field `user` set to `kimchy` It’s also possible to limit the number of processed documents by setting size. diff --git a/docs/java-rest/high-level/document/update-by-query.asciidoc b/docs/java-rest/high-level/document/update-by-query.asciidoc index 324385a442b5d..5c7e4f5d3b072 100644 --- a/docs/java-rest/high-level/document/update-by-query.asciidoc +++ b/docs/java-rest/high-level/document/update-by-query.asciidoc @@ -25,14 +25,13 @@ include-tagged::{doc-tests}/CRUDDocumentationIT.java[update-by-query-request-con -------------------------------------------------- <1> Set `proceed` on version conflict -You can limit the documents by adding a type to the source or by adding a query. +You can limit the documents by adding a query. ["source","java",subs="attributes,callouts,macros"] -------------------------------------------------- -include-tagged::{doc-tests}/CRUDDocumentationIT.java[update-by-query-request-typeOrQuery] +include-tagged::{doc-tests}/CRUDDocumentationIT.java[update-by-query-request-query] -------------------------------------------------- -<1> Only copy `doc` type -<2> Only copy documents which have field `user` set to `kimchy` +<1> Only copy documents which have field `user` set to `kimchy` It’s also possible to limit the number of processed documents by setting size. diff --git a/docs/java-rest/high-level/search/multi-search.asciidoc b/docs/java-rest/high-level/search/multi-search.asciidoc index 5d5910be30084..279b1c7fa39ad 100644 --- a/docs/java-rest/high-level/search/multi-search.asciidoc +++ b/docs/java-rest/high-level/search/multi-search.asciidoc @@ -28,10 +28,9 @@ For example: ["source","java",subs="attributes,callouts,macros"] -------------------------------------------------- -include-tagged::{doc-tests}/SearchDocumentationIT.java[search-request-indices-types] +include-tagged::{doc-tests}/SearchDocumentationIT.java[search-request-indices] -------------------------------------------------- <1> Restricts the request to an index -<2> Limits the request to a type [[java-rest-high-multi-search-sync]] ==== Synchronous Execution diff --git a/docs/java-rest/high-level/search/search.asciidoc b/docs/java-rest/high-level/search/search.asciidoc index e2bcfda79e6fc..81e680b92506b 100644 --- a/docs/java-rest/high-level/search/search.asciidoc +++ b/docs/java-rest/high-level/search/search.asciidoc @@ -33,10 +33,9 @@ Let's first look at some of the optional arguments of a +{request}+: ["source","java",subs="attributes,callouts,macros"] -------------------------------------------------- -include-tagged::{doc-tests-file}[{api}-request-indices-types] +include-tagged::{doc-tests-file}[{api}-request-indices] -------------------------------------------------- <1> Restricts the request to an index -<2> Limits the request to a type There are a couple of other interesting optional parameters: