Hibernate search is sorting results depending on relevance, it is normal. In addition to that, if two documents are having the same score, they are ordered by their primary keys.
book1 : id=1, bookTitle = "hibernate search by example".
book2 : id=2, bookTitle = "hibernate search in action"
If I am doing a query to look for terms "hibernate search", I would have this order : book1 then book2
I would like to invert this order : book2 then book1. Which means inverting primary key order. Is there a possible way to do this without implementing a custom Similarity ? At the same time keeping relevance order.