...
|
...
|
@@ -3,8 +3,10 @@ package com.yoho.search.service.aggregations.impls; |
|
|
import com.yoho.search.core.es.agg.IAggregation;
|
|
|
import com.yoho.search.service.aggregations.AggInterface;
|
|
|
import com.yoho.search.service.service.SearchCommonService;
|
|
|
import com.yoho.search.service.service.base.BrandIndexBaseService;
|
|
|
import com.yoho.search.service.servicenew.IShopsService;
|
|
|
import com.yoho.search.service.servicenew.impl.SearchAfterCacheService;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -17,6 +19,8 @@ public class AggregationFactoryService { |
|
|
private SearchCommonService searchCommonService;
|
|
|
@Autowired
|
|
|
private SearchAfterCacheService searchAfterCacheService;
|
|
|
@Autowired
|
|
|
private BrandIndexBaseService brandIndexBaseService;
|
|
|
|
|
|
@Autowired
|
|
|
private IShopsService shopsService;
|
...
|
...
|
@@ -43,7 +47,7 @@ public class AggregationFactoryService { |
|
|
iAggregation = new StyleAggregation(searchCommonService, paramMap);
|
|
|
break;
|
|
|
case AggInterface.BRAND:
|
|
|
iAggregation = new BrandAggregation(searchCommonService, paramMap);
|
|
|
iAggregation = new BrandAggregation(brandIndexBaseService, paramMap);
|
|
|
break;
|
|
|
case AggInterface.SIZE:
|
|
|
iAggregation = new SizeAggregation(searchCommonService);
|
...
|
...
|
@@ -96,11 +100,11 @@ public class AggregationFactoryService { |
|
|
}
|
|
|
|
|
|
public IAggregation getBrandAggregation(Map<String, String> paramMap) {
|
|
|
return new BrandAggregation(searchCommonService, paramMap);
|
|
|
return new BrandAggregation(brandIndexBaseService, paramMap);
|
|
|
}
|
|
|
|
|
|
public IAggregation getBrandAggregation(Map<String, String> paramMap, int brandCount) {
|
|
|
return new BrandAggregation(searchCommonService, paramMap, brandCount);
|
|
|
return new BrandAggregation(brandIndexBaseService, paramMap, brandCount);
|
|
|
}
|
|
|
|
|
|
public IAggregation getSizeAggregation() {
|
...
|
...
|
|