...
|
...
|
@@ -15,6 +15,7 @@ import com.yoho.search.models.SearchApiResult; |
|
|
import com.yoho.search.service.helper.SearchParamHelper;
|
|
|
import com.yoho.search.service.index.CollageActivityIndexBaseService;
|
|
|
import com.yoho.search.service.index.CollageProductIndexBaseService;
|
|
|
import com.yoho.search.service.scene.pages.selections.PageSelectionsBrandsService;
|
|
|
import com.yoho.search.service.scene.pages.selections.PageSelectionsService;
|
|
|
import com.yoho.search.service.scorer.YohoFilterFunctionBuilders;
|
|
|
import org.apache.commons.collections.MapUtils;
|
...
|
...
|
@@ -49,6 +50,8 @@ public class CollagePageService extends AbstractPageSceneService { |
|
|
private SearchParamHelper searchParamHelper;
|
|
|
@Autowired
|
|
|
private PageSelectionsService pageSelectionsService;
|
|
|
@Autowired
|
|
|
private PageSelectionsBrandsService pageSelectionsBrandsService;
|
|
|
|
|
|
private List<Integer> collageTopSkn(Map<String, String> paramMap) {
|
|
|
return ConvertUtils.stringToIntList(MapUtils.getString(paramMap, "collageTopSkn", ""), ",");
|
...
|
...
|
@@ -199,8 +202,15 @@ public class CollagePageService extends AbstractPageSceneService { |
|
|
|
|
|
//2、构造聚合条件
|
|
|
BoolQueryBuilder mustFilter = this.buildCollageMustFilter(validCollageActivitys);
|
|
|
List<IAggregation> collageAggregations = pageSelectionsService.getCollageAggregations(paramMap);
|
|
|
return pageSelectionsService.aggregations(paramMap, collageAggregations, mustFilter);
|
|
|
//List<IAggregation> collageAggregations = pageSelectionsService.getCollageAggregations(paramMap);
|
|
|
List<IAggregation> collageAggregations = pageSelectionsService.getCommonAggregations(paramMap);
|
|
|
|
|
|
//3、执行filter
|
|
|
SearchApiResult result = pageSelectionsService.aggregations(paramMap, collageAggregations, mustFilter);
|
|
|
if (result != null) {
|
|
|
pageSelectionsBrandsService.getRecommendBrands(paramMap, result);
|
|
|
}
|
|
|
return result;
|
|
|
} catch (Exception e) {
|
|
|
return SearchApiResultUtils.errorSearchApiResult(logger, paramMap, e);
|
|
|
}
|
...
|
...
|
|