为什么筛选条件api参数不是list?


(taoli) #1

如题,
QueryBuilder queryBuilder = QueryBuilders.boolQuery() .filter(BuildTerm("regionid", searchEstate.getRegionId())) .filter(BuildTerm("gscopeid", searchEstate.getGscopeId())) .filter(BuildTerm("showinweb", searchEstate.getShowAll())) .filter(BuildTerm("isdel", false))

如果有非常复杂得参数,操作起来非常麻烦,有没有更简单得方式?


(Luzhzhsoft) #2

boolQuery().must()返回list。用这个试试


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.