File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 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 {
125125 SearchRequest searchRequest = new SearchRequest (); // <1>
126126 SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder (); // <2>
127127 searchSourceBuilder .query (QueryBuilders .matchAllQuery ()); // <3>
128+ searchRequest .source (searchSourceBuilder ); // <4>
128129 // end::search-request-basic
129130 }
130131 {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ include-tagged::{doc-tests}/SearchDocumentationIT.java[search-request-basic]
1818<1> Creates the `SeachRequest`. Without arguments this runs against all indices.
1919<2> Most search parameters are added to the `SearchSourceBuilder`. It offers setters for everything that goes into the search request body.
2020<3> Add a `match_all` query to the `SearchSourceBuilder`.
21+ <4> Add the `SearchSourceBuilder` to the `SeachRequest`.
2122
2223===== Optional arguments
2324
You can’t perform that action at this time.
0 commit comments