This commit is contained in:
冯辉
2026-06-28 15:35:21 +08:00
parent e863f7f404
commit cacade02ff

View File

@@ -518,8 +518,12 @@ public class ESJobSearchImpl implements IESJobSearchService
}
}
if (!StringUtil.isEmptyOrNull(cateStr)) {
// category 搜索时同时匹配 jobCategory 和 jobTitle避免因 jobCategory 字段为空而搜不到
if (!first) sub.or();
sub.match(ESJobDocument::getJobCategory, cateStr, 5.0f);
first = false;
sub.or();
sub.match(ESJobDocument::getJobTitle, cateStr, 5.0f);
}
});
}