...
|
...
|
@@ -214,11 +214,7 @@ public class SearchServiceHelper { |
|
|
int[] storeShowStatuss = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.PARAM_SEARCH_STORESHOWSTATUS), ",");
|
|
|
boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.storeShowStatus, storeShowStatuss));
|
|
|
}
|
|
|
//自定义标签
|
|
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.SHOPS_PARAM_CUSTOMIZE_TAG)) {
|
|
|
int[] ids = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.SHOPS_PARAM_CUSTOMIZE_TAG), ",");
|
|
|
boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.customizeTagsId, ids));
|
|
|
}
|
|
|
|
|
|
// //////////////////////////////////////////不支持多个参数///////////////////////////////////////////////////////////
|
|
|
// 是否特价
|
|
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_SPECIALOFFER)) {
|
...
|
...
|
@@ -452,6 +448,12 @@ public class SearchServiceHelper { |
|
|
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.activities, activitiesTermsBuilder,ScoreMode.None));
|
|
|
}
|
|
|
|
|
|
//自定义标签
|
|
|
BoolQueryBuilder customizeTagsTermsBuilder = searchCommonHelper.getCustomizeTagBuilder(paramMap);
|
|
|
if (customizeTagsTermsBuilder != null) {
|
|
|
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.customizeTags, customizeTagsTermsBuilder,ScoreMode.None));
|
|
|
}
|
|
|
|
|
|
// 如果contain_seckill!=Y,则过滤掉秒杀商品
|
|
|
if (!paramMap.containsKey(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL) || !"Y".equals(paramMap.get(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL))) {
|
|
|
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.isSeckill, "Y"));
|
...
|
...
|
@@ -482,6 +484,8 @@ public class SearchServiceHelper { |
|
|
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.shopId, paramMap.get(SearchRequestParams.PARAM_SEARCH_NOT_SHOP_ID).split(",")));
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// // 通用的过滤请求
|
|
|
// for (String key : paramMap.keySet()) {
|
|
|
// if (key.startsWith("not_")) {
|
...
|
...
|
|