...
|
...
|
@@ -273,6 +273,10 @@ public class SearchServiceHelper { |
|
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE)) {
|
|
|
boolFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isDepositAdvance, paramMap.get(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE)));
|
|
|
}
|
|
|
// 是否定金促销
|
|
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE)) {
|
|
|
boolFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isLimitTimeAdvance, paramMap.get(SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE)));
|
|
|
}
|
|
|
// 是否新品
|
|
|
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_ISNEW)) {
|
|
|
boolFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isnew, paramMap.get(SearchRequestParams.PARAM_SEARCH_ISNEW)));
|
...
|
...
|
@@ -450,15 +454,14 @@ public class SearchServiceHelper { |
|
|
// 活动模板相关的过滤条件
|
|
|
BoolQueryBuilder activitiesTermsBuilder = searchCommonHelper.getActivitiesTermsBuilder(paramMap);
|
|
|
if (activitiesTermsBuilder != null) {
|
|
|
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.activities, activitiesTermsBuilder,ScoreMode.None));
|
|
|
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));
|
|
|
}
|
|
|
// 自定义标签
|
|
|
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))) {
|
...
|
...
|
@@ -490,8 +493,6 @@ 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_")) {
|
...
|
...
|
|