|
@@ -214,11 +214,7 @@ public class SearchServiceHelper { |
|
@@ -214,11 +214,7 @@ public class SearchServiceHelper { |
214
|
int[] storeShowStatuss = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.PARAM_SEARCH_STORESHOWSTATUS), ",");
|
214
|
int[] storeShowStatuss = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.PARAM_SEARCH_STORESHOWSTATUS), ",");
|
215
|
boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.storeShowStatus, storeShowStatuss));
|
215
|
boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.storeShowStatus, storeShowStatuss));
|
216
|
}
|
216
|
}
|
217
|
- //自定义标签
|
|
|
218
|
- if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.SHOPS_PARAM_CUSTOMIZE_TAG)) {
|
|
|
219
|
- int[] ids = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.SHOPS_PARAM_CUSTOMIZE_TAG), ",");
|
|
|
220
|
- boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.customizeTagsId, ids));
|
|
|
221
|
- }
|
217
|
+
|
222
|
// //////////////////////////////////////////不支持多个参数///////////////////////////////////////////////////////////
|
218
|
// //////////////////////////////////////////不支持多个参数///////////////////////////////////////////////////////////
|
223
|
// 是否特价
|
219
|
// 是否特价
|
224
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_SPECIALOFFER)) {
|
220
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_SPECIALOFFER)) {
|
|
@@ -452,6 +448,12 @@ public class SearchServiceHelper { |
|
@@ -452,6 +448,12 @@ public class SearchServiceHelper { |
452
|
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.activities, activitiesTermsBuilder,ScoreMode.None));
|
448
|
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.activities, activitiesTermsBuilder,ScoreMode.None));
|
453
|
}
|
449
|
}
|
454
|
|
450
|
|
|
|
451
|
+ //自定义标签
|
|
|
452
|
+ BoolQueryBuilder customizeTagsTermsBuilder = searchCommonHelper.getCustomizeTagBuilder(paramMap);
|
|
|
453
|
+ if (customizeTagsTermsBuilder != null) {
|
|
|
454
|
+ boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.customizeTags, customizeTagsTermsBuilder,ScoreMode.None));
|
|
|
455
|
+ }
|
|
|
456
|
+
|
455
|
// 如果contain_seckill!=Y,则过滤掉秒杀商品
|
457
|
// 如果contain_seckill!=Y,则过滤掉秒杀商品
|
456
|
if (!paramMap.containsKey(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL) || !"Y".equals(paramMap.get(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL))) {
|
458
|
if (!paramMap.containsKey(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL) || !"Y".equals(paramMap.get(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL))) {
|
457
|
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.isSeckill, "Y"));
|
459
|
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.isSeckill, "Y"));
|
|
@@ -481,7 +483,9 @@ public class SearchServiceHelper { |
|
@@ -481,7 +483,9 @@ public class SearchServiceHelper { |
481
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_NOT_SHOP_ID)) {
|
483
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_NOT_SHOP_ID)) {
|
482
|
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.shopId, paramMap.get(SearchRequestParams.PARAM_SEARCH_NOT_SHOP_ID).split(",")));
|
484
|
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.shopId, paramMap.get(SearchRequestParams.PARAM_SEARCH_NOT_SHOP_ID).split(",")));
|
483
|
}
|
485
|
}
|
484
|
-
|
486
|
+
|
|
|
487
|
+
|
|
|
488
|
+
|
485
|
// // 通用的过滤请求
|
489
|
// // 通用的过滤请求
|
486
|
// for (String key : paramMap.keySet()) {
|
490
|
// for (String key : paramMap.keySet()) {
|
487
|
// if (key.startsWith("not_")) {
|
491
|
// if (key.startsWith("not_")) {
|