As your questions say:
All documents with the same rating will be sorted in descending order by date added.
The other answer you received is perfect.
In any case, I suggest you make sure that you really want to sort by date only for a document with the same account. In my experience, this has always been wrong. In fact, the solr score is not absolute, but only relative to other documents, and each document is different.
Therefore, I would not sort by invoice, and then something else, because it is difficult to predict when you will have the same invoice for different documents. I would personally sort only by score and use the function to increase the last documents. You can find a good example in the solr wiki , it uses the recip(ms(NOW,date_field),3.16e-11,1,1) function recip(ms(NOW,date_field),3.16e-11,1,1) .
If you are worried about performance, you can try increasing the speed of the index, which should be faster than increasing the query time. Take a look here .
javanna
source share