1.我现在使用的是6.8.2版本
2. should must 多个查询. should是多个字段匹配一个值
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
// 过滤1个
boolQueryBuilder.filter(QueryBuilders.termQuery(ProductIndexKey.STATUS, StatusEnum.ACTIVE.getCode()));
// should条件 两个
WildcardQueryBuilder queryBuilder_oeCode = QueryBuilders.wildcardQuery(
ProductIndexKey.OE_CODE,mallSearch.getKeywords() + SymbolConstants.STAR_SYMBOL);
WildcardQueryBuilder queryBuilder_brandCode = QueryBuilders.wildcardQuery(
ProductIndexKey.BRAND_CODE,mallSearch.getKeywords() + SymbolConstants.STAR_SYMBOL);
boolQueryBuilder.should(queryBuilder_oeCode);
boolQueryBuilder.should(queryBuilder_brandCode);
boolQueryBuilder.must(QueryBuilders.existsQuery(ProductIndexKey.TID_LIST));
3.这样的should must 多个在一起 我这样的写法对吗? 对于6.8版本