Search in sleep mode sorts the results according to relevance, this is normal. In addition to this, if two documents have the same score, they are sorted by their main keys.
For example,
book1: id = 1, booktitle = "sleeping search by example".
book2: id = 2, booktitle = "sleep search in action"
If I execute a query to search for the terms "sleeping search", I will have this order: book1 then book2
I would like to invert this order: book2 then book1. This means inverting the order of the primary key. Is there a way to do this without implementing user affinity? At the same time, compliance with the order of compliance.
hibernate hibernate-search lucene
Bilal bbb
source share