Origin query
# API
//Semi-native query (can also be classified as mixed query, which is usually used when customizing Aggregation)
SearchResponse search(LambdaEsQueryWrapper<T> wrapper) throws IOException;
//The standard native query can specify RequestOptions.
SearchResponse search(SearchRequest searchRequest, RequestOptions requestOptions) throws IOException;
2
3
4
tips
For the scenario where mixed query still can't be solved, you can call the standard native query method provided by us to query, and both the input and the return are RestHighLevelClient native, which is consistent with the direct use of RestHighLevelClient query. If you need to use RestHighLevelClient in your code, you can directly use the @Autowired annotation to inject it. EE has automatically configured the bean for you.
@Service
public class xxxService{
//Just inject it directly where needed.
@Autowried
private RestHighLevelClient restHighLevelClient;
}
2
3
4
5
6
If you even need to customize the RestHighLevelClient automatically assembled by EE, then we also support it, because we have added the annotation @ conditionaonclass (resthighlevelclient. class) to the automatically assembled class. If you have configured ResthighevelClient yourself, the framework will be subject to the ResthighevelClient you have configured. EE provides you with extreme flexibility and extensibility, ensuring that you can use it with confidence.