Reputation: 983
I have a complex, reusable method that returns a BooleanExpression to filter a Q object QPost
.
How do I use this BooleanExpression in a Hibernate Search query like this:
Search.session(entityManager).search(Post.class)
.where(f -> {
var boolStep = f.bool()
.must(f.match().fields("title", "text", "author.name").matching(searchText))
});
Upvotes: 0
Views: 242
Reputation: 9977
You mean an expression built using the QueryDSL project?
That project still uses Hibernate Search 5, not 6, so currently you cannot use it with Hibernate Search 6.
Perhaps you should create an issue on that project, and if you can, contribute the upgrade yourself?
Upvotes: 1