From cbd201c43b175d95a85360aec4797cfe13d68593 Mon Sep 17 00:00:00 2001 From: Chopper Date: Mon, 25 Apr 2022 18:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search/serviceimpl/EsGoodsSearchServiceImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java index ac19929b..179c8f6c 100644 --- a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java @@ -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); } - /** * 转换搜索结果为聚合商品展示信息 *