es java 多条件查询

形如mysql中where条件 a=8 and (b=3 or b=4)

BoolQueryBuilder builder = QueryBuilders.boolQuery()

.must(QueryBuilders.termQuery(a,8))
.must(QueryBuilders.boolQuery()
.should(QueryBuilders.termQuery(b,3))
.should(QueryBuilders.termQuery(b,4)));

上一篇:牛客练习赛 74 F


下一篇:替罪羊树