Authored by wangnan9279

tbl delete

... ... @@ -152,13 +152,6 @@ public class SearchDynamicConfigService {
}
/**
* 全球购查新索引
*/
public boolean tblUseNewIndex() {
return configReader.getBoolean("search.tbl.use.new.index", true);
}
/**
* group_shop新实现
*/
public boolean groupShopNew() {
... ...
... ... @@ -2,11 +2,10 @@ package com.yoho.search.service.scene.others.tbl;
import com.alibaba.fastjson.JSONObject;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.common.SearchCommonService;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.common.SearchCommonService;
import com.yoho.search.common.SearchDynamicConfigService;
import org.apache.commons.lang.StringUtils;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
... ... @@ -34,8 +33,6 @@ public class TblProductService {
private SearchCommonService searchCommonService;
@Autowired
private TblProductServiceHepler tblProductServiceHepler;
@Autowired
private SearchDynamicConfigService searchDynamicConfigService;
public SearchApiResult search(Map<String, String> paramMap) throws Exception {
... ... @@ -75,17 +72,8 @@ public class TblProductService {
// 4、增加aggregation
searchParam.setAggregationBuilders(tblProductServiceHepler.buildAggregations(paramMap));
boolean tblUseNewIndex = searchDynamicConfigService.tblUseNewIndex();
SearchResult searchResult;
if (tblUseNewIndex) {
searchResult = searchCommonService.doSearch(ISearchConstants.INDEX_NAME_TBLPRODUCT_NEW, searchParam);
} else {
searchResult = searchCommonService.doSearch(ISearchConstants.INDEX_NAME_TBLPRODUCT, searchParam);
}
// 5、执行搜索
SearchResult searchResult = searchCommonService.doSearch(ISearchConstants.INDEX_NAME_TBLPRODUCT_NEW, searchParam);
// 6、构造返回结果
JSONObject dataMap = new JSONObject();
... ...
... ... @@ -120,8 +120,6 @@ search.persional.rateLimit.productindex.aggProductListByBrand=100:2
search.persional.rateLimit.productindex.recommendShop=100:2
search.persional.rateLimit.productindex.aggRecommendBrand=100:2
search.tbl.use.new.index = true
search.shop.group.new=true
search.agg.brand.product.new=true
... ...