Showing
1 changed file
with
8 additions
and
11 deletions
1 | package com.yoho.search.service.base.index; | 1 | package com.yoho.search.service.base.index; |
2 | 2 | ||
3 | -import java.util.*; | ||
4 | - | ||
5 | -import com.alibaba.fastjson.JSON; | ||
6 | -import com.alibaba.fastjson.JSONObject; | 3 | +import com.yoho.search.base.utils.ConvertUtils; |
4 | +import com.yoho.search.base.utils.ISearchConstants; | ||
7 | import com.yoho.search.base.utils.ProductIndexEsField; | 5 | import com.yoho.search.base.utils.ProductIndexEsField; |
6 | +import com.yoho.search.core.es.model.SearchParam; | ||
7 | +import com.yoho.search.core.es.model.SearchResult; | ||
8 | import com.yoho.search.models.RecommendPromotionAggVO; | 8 | import com.yoho.search.models.RecommendPromotionAggVO; |
9 | +import com.yoho.search.service.base.SearchCommonService; | ||
9 | import org.apache.commons.collections.MapUtils; | 10 | import org.apache.commons.collections.MapUtils; |
10 | import org.apache.commons.lang.StringUtils; | 11 | import org.apache.commons.lang.StringUtils; |
11 | import org.elasticsearch.index.query.BoolQueryBuilder; | 12 | import org.elasticsearch.index.query.BoolQueryBuilder; |
@@ -14,14 +15,10 @@ import org.slf4j.Logger; | @@ -14,14 +15,10 @@ import org.slf4j.Logger; | ||
14 | import org.slf4j.LoggerFactory; | 15 | import org.slf4j.LoggerFactory; |
15 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
16 | import org.springframework.stereotype.Service; | 17 | import org.springframework.stereotype.Service; |
17 | - | ||
18 | -import com.yoho.search.base.utils.ConvertUtils; | ||
19 | -import com.yoho.search.base.utils.ISearchConstants; | ||
20 | -import com.yoho.search.core.es.model.SearchParam; | ||
21 | -import com.yoho.search.core.es.model.SearchResult; | ||
22 | -import com.yoho.search.service.base.SearchCommonService; | ||
23 | import org.springframework.util.CollectionUtils; | 18 | import org.springframework.util.CollectionUtils; |
24 | 19 | ||
20 | +import java.util.*; | ||
21 | + | ||
25 | /** | 22 | /** |
26 | * Created by wangnan on 2017/5/11. | 23 | * Created by wangnan on 2017/5/11. |
27 | */ | 24 | */ |
@@ -58,7 +55,7 @@ public class PromotionIndexBaseService { | @@ -58,7 +55,7 @@ public class PromotionIndexBaseService { | ||
58 | BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); | 55 | BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery(); |
59 | boolQueryBuilder.must(QueryBuilders.termsQuery(ProductIndexEsField.id, ids)); | 56 | boolQueryBuilder.must(QueryBuilders.termsQuery(ProductIndexEsField.id, ids)); |
60 | boolQueryBuilder.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1)); | 57 | boolQueryBuilder.must(QueryBuilders.termQuery(ProductIndexEsField.status, 1)); |
61 | - boolQueryBuilder.mustNot(QueryBuilders.termQuery(ProductIndexEsField.MATCHED_PROMOTIONS_ISDEL, "Y")); | 58 | + boolQueryBuilder.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isDel, "Y")); |
62 | 59 | ||
63 | searchParam.setFiter(boolQueryBuilder); | 60 | searchParam.setFiter(boolQueryBuilder); |
64 | searchParam.setSize(ids.size()); | 61 | searchParam.setSize(ids.size()); |
-
Please register or login to post a comment