还原配置

This commit is contained in:
Chopper 2022-04-25 18:58:01 +08:00
parent a6d734bacf
commit cbd201c43b

View File

@ -36,10 +36,9 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.core.SearchHitSupport;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.SearchPage;
@ -73,8 +72,7 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
* ES
*/
@Autowired
@Qualifier("elasticsearchRestTemplate")
private ElasticsearchRestTemplate restTemplate;
private ElasticsearchOperations restTemplate;
@Autowired
private EsGoodsIndexService esGoodsIndexService;
@ -145,7 +143,6 @@ public class EsGoodsSearchServiceImpl implements EsGoodsSearchService {
return this.restTemplate.get(id, EsGoodsIndex.class);
}
/**
* 转换搜索结果为聚合商品展示信息
*