[
https://issues.apache.org/jira/browse/LUCENE-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666279#action_12666279
]
Hoss Man commented on LUCENE-1524:
----------------------------------
bq. If this assumption holds for your application, you can use the approach
suggested by Michael and explicitly express it in the query. But to force it
onto all users of Lucene doesn't seem to be a good solution.
exactly. by being undefined Lucene doesn't have to explicitly compute a
secondary sort when the client doesn't ask for it...
{code}
// sorts on field F ascending, behavior in ties in undefined
Sort a1 = new Sort(new SortField[] { new SortField(F, SortField.STRING, false)
});
// sorts on field F descending, behavior in ties is undefined.
Sort d1 = new Sort(new SortField[] { new SortField(F, SortField.STRING, true)
});
// sorts on field F ascending, behavior in ties is ascending sort by internal
id
Sort a2 = new Sort(new SortField[] {
new SortField(F, SortField.STRING, false), new SortField(null,
SortField.DOC, false) });
// sorts on field F descending, behavior in ties is descending sort by internal
id
Sort d2 = new Sort(new SortField[] {
new SortField(F, SortField.STRING, true), new SortField(null, SortField.DOC,
true) });
{code}
> 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]