hibernet搜索通配符,包含2个字

时间:2016-02-09 11:47:52

标签: lucene wildcard

我用两个词来查询,即“测试”和“测试”。我想要这样的东西:

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(),那么这两个字将被视为一个。

0 个答案:

没有答案