岗位搜索功能问题修复

This commit is contained in:
冯辉
2026-06-28 15:09:17 +08:00
parent a907d1f1a2
commit e863f7f404
2 changed files with 2 additions and 1 deletions

View File

@@ -117,6 +117,7 @@ public class ESJobDocument
private String industry;
@ApiModelProperty("岗位分类")
@IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_SMART)
private String jobCategory;
@JsonIgnore

View File

@@ -519,7 +519,7 @@ public class ESJobSearchImpl implements IESJobSearchService
}
if (!StringUtil.isEmptyOrNull(cateStr)) {
if (!first) sub.or();
sub.eq(ESJobDocument::getJobCategory, cateStr);
sub.match(ESJobDocument::getJobCategory, cateStr, 5.0f);
}
});
}