ES DSL查询实现
//todo 2.准备Request - 搜索哪个索引库 SearchRequest searchRequest = new SearchRequest("hotel");
//todo 4.所有的搜索条件封装对象 searchSourceBuilder SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
//**************** 条件封装的位置 *******************
//************************************************
//todo 3.准备DSL - 添加搜索条件 searchRequest.source(searchSourceBuilder);
//todo 1.发送请求 - 搜索方法 SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
//todo 5.抽取返回值数据 SearchHits searchHits = searchResponse.getHits();
标签:searchSourceBuilder,searchRequest,DSL,查询,JSON,ElasticSearch,搜索,todo From: https://www.cnblogs.com/Rover20230226/p/17500919.html