Authored by saihide

delete pools

... ... @@ -377,22 +377,6 @@ public class SearchCommonHelper {
}
/**
* 构造商品池相关的过滤条件
*
* @param paramMap
* @return
*/
public BoolQueryBuilder getPoolIdTermsBuilder(Map<String, String> paramMap) {
// 增加商品池相关的过滤条件
if (paramMap.containsKey("filter_poolId") && StringUtils.isNotBlank("filter_poolId")) {
BoolQueryBuilder nestedBoolFilter = QueryBuilders.boolQuery();
nestedBoolFilter.must(QueryBuilders.termQuery("pools.pool_id", paramMap.get("filter_poolId")));
return nestedBoolFilter;
}
return null;
}
/**
* 自定义标签过滤
*
* @param paramMap
... ...
... ... @@ -238,14 +238,6 @@ public class SearchSortHelper {
activitySort.setNestedFilter(activitiesTermsBuilder);
}
sortBuilders.add(activitySort);
} else if (fieldName.contains("pools")) {
BoolQueryBuilder poolsTermsBuilder = searchCommonHelper.getPoolIdTermsBuilder(paramMap);
String flag = sortOrder.toString().equals("desc") ? "_last" : "_first";
FieldSortBuilder poolsFieldSortBuilder = SortBuilders.fieldSort(fieldName).order(sortOrder).setNestedPath("pools").missing(flag);
if (poolsFieldSortBuilder != null) {
poolsFieldSortBuilder.setNestedFilter(poolsTermsBuilder);
}
sortBuilders.add(poolsFieldSortBuilder);
} else {
this.addSortBuildSorts(sortBuilders, filteredFieldNames, fieldName, sortOrder);
}
... ...