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 @@ -125,6 +125,7 @@ public void testSearch() throws Exception {
125
125
SearchRequest searchRequest = new SearchRequest (); // <1>
126
126
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder (); // <2>
127
127
searchSourceBuilder .query (QueryBuilders .matchAllQuery ()); // <3>
128
+ searchRequest .source (searchSourceBuilder ); // <4>
128
129
// end::search-request-basic
129
130
}
130
131
{
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