我用两个词来查询,即“测试”和“测试”。我想要这样的东西:
org.apache.lucene.search.Query query = (org.apache.lucene.search.Query) qb
.keyword()
.wildcard()
.onFields("jobTitle", "tags", "role", "DepartmentName",
"skillSet", "longDescription", "designation",
"qualification", "desiredSkill", "location")
.matching("test* tests*").createQuery();`
如果我放wildcard()
,那么这两个字将被视为一个。