Authored by 胡古飞

品类列表支持一个SKN排在前面

... ... @@ -58,8 +58,13 @@ public class FunctionScoreSearchHelper {
// 将某些SKN展示到前面
if (searchCommonHelper.isFirstProductSknSearch(paramMap)) {
String[] productSkns = paramMap.get(SearchRequestParams.PARAM_SEARCH_FIRST_PRODUCRSKN).split(",");
//品类列表支持1个排前面
if(searchCommonHelper.isSortPageDefault(paramMap)){
functionScoreQueryBuilder.add(QueryBuilders.termQuery(ProductIndexEsField.productSkn, productSkns[0]), ScoreFunctionBuilders.weightFactorFunction(1000));
}else{
functionScoreQueryBuilder.add(QueryBuilders.termsQuery(ProductIndexEsField.productSkn, productSkns), ScoreFunctionBuilders.weightFactorFunction(1000));
}
}
// 个性化搜索相关
if (searchCommonHelper.isNeedPersonalSearch(paramMap)) {
this.addCommonPersonalizedScriptScore(functionScoreQueryBuilder, paramMap);
... ...