ElasticSearch的BoolQueryBuilder定义:
A Query that matches documents matching boolean combinations of other queries
import org.elasticsearch.index.query.QueryBuilders;BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
for (String word : wordList) {boolQueryBuilder.should(QueryBuilders.termQuery(FIELD1, word));boolQueryBuilder.should(QueryBuilders.termQuery(FIELD2, word));
}