ES搜索匹配调整

This commit is contained in:
daihh
2023-03-10 00:47:47 +08:00
parent 3a913162cf
commit 6c2d474b18

View File

@@ -188,7 +188,7 @@ public class CourseStudyElasticsearchImpl implements ICourseStudySearch{
boolQuery.filter(QueryBuilders.wildcardQuery("courseName", "*"+words+"*"));
}
if(dto.getCourseType()!=null) {
if(dto.getCourseType()==10) {
if(dto.getCourseType()==10 || dto.getCourseType()==20) {
int[] types=new int[] {10,20};
boolQuery.filter(QueryBuilders.termsQuery("courseType",types));
}else {