You know how sometimes on web sites you see an order by option like order by relevance and a percentage is retured with how relevant the record is to the entered search criteria.
Typically relevance grading is being done by a more sophisticated search tool than a relational database (i.e. Lucene).
Using Hibernate, well doing this isn SQL or HQL is going to be difficult. However Hibernate searches return Collections of results, and Collections can be sorted based on Comparators. Could you not define your relevance rules in a Comparator and sort the list like that?