[
https://issues.apache.org/jira/browse/LUCENE-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665914#action_12665914
]
Michael McCandless commented on LUCENE-1524:
--------------------------------------------
I can appreciate the motivation to fix this, but I don't see a
reliable way to do so.
EG say I sort first by Title reversed and then document size
non-reversed. In that case, should the tie-breaker (sort by docID) be
reversed or not? (Or, vice/versa).
I don't think it's well defined, because Lucene doesn't have a
toplevel (in the Sort object) reversed boolean (it's per-SortField).
That fallback ("compare by docID") is sort of an emergency
tie-breaker, to make sure you get deterministic results when your sort
leaves ambiguity.
One simple way to get the behavior you want is to disambiguate
your sort by adding SortField.FIELD_DOC at the end. Then you can
explicitly control whether it's reversed or not...
> True reverse sorting
> --------------------
>
> Key: LUCENE-1524
> URL: https://issues.apache.org/jira/browse/LUCENE-1524
> Project: Lucene - Java
> Issue Type: Bug
> Components: Search
> Affects Versions: 2.4
> Reporter: Jiri Kuhn
> Priority: Minor
> Fix For: 2.4.1
>
> Attachments: reverse.patch
>
>
> If documents sorted have the same sort value, they are sorted in the same way
> even if the reverse flag is true.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]