feat: There is no way the, elasticsearch

This commit is contained in:
super_liu
2021-11-07 16:45:29 +08:00
parent 0e8c361fc2
commit 39a61ad8dc
@@ -1174,10 +1174,14 @@ public class SearchCenterServiceImpl implements SearchCenterService {
boolQueryBuilder.must(multiQuery);
}
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS()) || StringUtils.isNotBlank(searchInfoEO.getCLLX())){
BoolQueryBuilder boolQueryShould = QueryBuilders.boolQuery();
boolQueryShould = querySeniorMsg(searchInfoEO,boolQueryShould);
boolQueryBuilder.must(boolQueryShould);
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
}else if(StringUtils.isNotBlank(searchInfoEO.getCLLX())){
boolQueryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
"textContent"
).minimumShouldMatch("100%").field("title",10f));
}
HighlightBuilder hiBuilder=new HighlightBuilder();