You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2014/03/10 09:14:47 UTC

[jira] [Resolved] (LUCENE-5314) Decide on whether the central class of the sorting API should be a sorter or a comparator

     [ https://issues.apache.org/jira/browse/LUCENE-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand resolved LUCENE-5314.
----------------------------------

    Resolution: Fixed

Superseded by LUCENE-5493.

> Decide on whether the central class of the sorting API should be a sorter or a comparator
> -----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5314
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5314
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/other
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>
> Robert made a good point on LUCENE-5312 that the API currently feels half baked since it exposes Sorter as a central point of the API while all the useful impls are based on a comparator.
> Initially, I wanted a Sorter to be the central class because it would allow to compute a DocMap eg. to revert the order of the documents in the index without having to actually sort the documents. If you look at Sorter.REVERSE_DOCS, it returns the DocMap that reverts index order in constant time.
> However, this Sorter-based API doesn't allow for composability although a comparator-based API could. For example, we would like to be able to compose a sorter for block joins based on a sorter for parents and another for children.
> So maybe the use-cases that are not based on an actual sort are not really important and we could enforce sorting so that sorters could be composable?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org