Showing
1 changed file
with
5 additions
and
0 deletions
@@ -58,8 +58,13 @@ public class FunctionScoreSearchHelper { | @@ -58,8 +58,13 @@ public class FunctionScoreSearchHelper { | ||
58 | // 将某些SKN展示到前面 | 58 | // 将某些SKN展示到前面 |
59 | if (searchCommonHelper.isFirstProductSknSearch(paramMap)) { | 59 | if (searchCommonHelper.isFirstProductSknSearch(paramMap)) { |
60 | String[] productSkns = paramMap.get(SearchRequestParams.PARAM_SEARCH_FIRST_PRODUCRSKN).split(","); | 60 | String[] productSkns = paramMap.get(SearchRequestParams.PARAM_SEARCH_FIRST_PRODUCRSKN).split(","); |
61 | + //品类列表支持1个排前面 | ||
62 | + if(searchCommonHelper.isSortPageDefault(paramMap)){ | ||
63 | + functionScoreQueryBuilder.add(QueryBuilders.termQuery(ProductIndexEsField.productSkn, productSkns[0]), ScoreFunctionBuilders.weightFactorFunction(1000)); | ||
64 | + }else{ | ||
61 | functionScoreQueryBuilder.add(QueryBuilders.termsQuery(ProductIndexEsField.productSkn, productSkns), ScoreFunctionBuilders.weightFactorFunction(1000)); | 65 | functionScoreQueryBuilder.add(QueryBuilders.termsQuery(ProductIndexEsField.productSkn, productSkns), ScoreFunctionBuilders.weightFactorFunction(1000)); |
62 | } | 66 | } |
67 | + } | ||
63 | // 个性化搜索相关 | 68 | // 个性化搜索相关 |
64 | if (searchCommonHelper.isNeedPersonalSearch(paramMap)) { | 69 | if (searchCommonHelper.isNeedPersonalSearch(paramMap)) { |
65 | this.addCommonPersonalizedScriptScore(functionScoreQueryBuilder, paramMap); | 70 | this.addCommonPersonalizedScriptScore(functionScoreQueryBuilder, paramMap); |
-
Please register or login to post a comment