File tree 2 files changed +2
-0
lines changed
client/rest-high-level/src/test/java/org/elasticsearch/client/documentation
docs/java-rest/high-level/apis
2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ public void testSearch() throws IOException {
123
123
SearchRequest searchRequest = new SearchRequest (); // <1>
124
124
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder (); // <2>
125
125
searchSourceBuilder .query (QueryBuilders .matchAllQuery ()); // <3>
126
+ searchRequest .source (searchSourceBuilder ); // <4>
126
127
// end::search-request-basic
127
128
}
128
129
{
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ include-tagged::{doc-tests}/SearchDocumentationIT.java[search-request-basic]
18
18
<1> Creates the `SeachRequest`. Without arguments this runs against all indices.
19
19
<2> Most search parameters are added to the `SearchSourceBuilder`. It offers setters for everything that goes into the search request body.
20
20
<3> Add a `match_all` query to the `SearchSourceBuilder`.
21
+ <4> Add the `SearchSourceBuilder` to the `SeachRequest`.
21
22
22
23
===== Optional arguments
23
24
You can’t perform that action at this time.
0 commit comments