Origin query
# API
// semi-native query
SearchResponse search(LambdaEsQueryWrapper<T> wrapper) throws IOException;
// Standard native query can specify RequestOptions
SearchResponse search(SearchRequest searchRequest, RequestOptions requestOptions) throws IOException;
2
3
4
5
Tips
In some high-level grammars, such as specifying a highlighted field, if our return type is the entity object itself, but there is usually no highlighted field in the entity, so the highlighted field cannot be received. In this case, the native return object SearchResponse of RestHighLevelClient can be used. Although EE covers most of the scenarios where we use ES, there may still be scenarios that are not covered. At this time, you can still query through the native syntax provided by RestHighLevelClient, just call the standard native query method, and the input parameters and returns are both RestHighLevelClient native If you need to use RestHighLevelClient in your code, you can directly use @Autowired annotation injection, EE has automatically configured the bean for you, so using EE is always >=RestHighLevelClient.