HIbernate is the library.. there's nothing that hibernate can make use of to provide additional functionality.
You could write a more complex query, returning a rating for each result along with the result. This would involve complex subqueries, and the return from the eventual list() method would be an Object[2] rather than an instance of the class you're searching for, so dealing with that is a bit more complex too.
If you're not too fussy about the rating, the Subqueries class provides a few methods, all of which have "some" in their name, that do something approaching fuzzy searching.
Finally, the easiest but least efficient option is to do multiple searches, one for each criterion, then build a final result list from it. Whenever an item appears in a list, its rating is incremented.
|