Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When Examine returns the results, the default is to sort them by the score.
This is fine, but when multiple documents have the same score they are then sorted by the Document Id. This looks like it is an Examine ID.
The result is documents sorted in a way that doesn't make sense to the end user.
Is there a way to get Examine/Lucene to sort by score and by nodeName or any other field?
Depending on how are you retrieving you examine results.
you could order the returned results?
foreach (var result in results.OrderByDescending( x => x.Score ).ThenByDescending( x => x.[anotherProperty] ) ){ ... }
Or you can also do optimised in the lucene query (better for paging too)
https://github.com/Shazwazza/Examine/wiki/Sorting-results
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Sorting Examine results
When Examine returns the results, the default is to sort them by the score.
This is fine, but when multiple documents have the same score they are then sorted by the Document Id. This looks like it is an Examine ID.
The result is documents sorted in a way that doesn't make sense to the end user.
Is there a way to get Examine/Lucene to sort by score and by nodeName or any other field?
Depending on how are you retrieving you examine results.
you could order the returned results?
Or you can also do optimised in the lucene query (better for paging too)
https://github.com/Shazwazza/Examine/wiki/Sorting-results
is working on a reply...