It turns out it's not possible to migrate to use the JPA Criteria API without making breaking changes. The main issue is that we expose the method org.hibernate.search.FullTextQuery.setCriteriaQuery(Criteria): if the user sets a custom Criteria, we'd needto convert that to a JPA Criteria to combine it with our additional restrictions. This conversion is not possible, or extremely tricky. When Hibernate ORM will introduce SQM we'll have a better and converged representation, at that point we can re-evaluate getting rid of using the legacy Criteria internally. For now we should just bypass logging the WARN, as end users can't do much about it: rephrased the issue title. |