Hibernate Search: How to use wildcards correctly?
问题 I have the following query to search patients by full name, for an specific medical center: MustJunction mj = qb.bool().must(qb.keyword() .onField("medicalCenter.id") .matching(medicalCenter.getId()) .createQuery()); for(String term: terms) if(!term.equals("")) mj.must(qb.keyword() .onField("fullName") .matching(term+"*") .createQuery()); And it is working perfectly, but only if the user types the full firstname and/or lastname of the patient. However I would like to make if work even if the