[ 
https://issues.apache.org/jira/browse/LUCENE-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13594674#comment-13594674
 ] 

Shai Erera commented on LUCENE-3918:
------------------------------------

bq. Are there actual use-cases for sorting by stored fields or payloads? If not 
I think we should remove StoredFieldsSorter and PayloadSorter?

The original 3x implementation allowed sorting only by stored fields, so we 
thought if it was useful to someone then, it might be useful now. And sort by 
payload value was useful in the past, before DV days, and e.g. we still have 
code that stores sort-by values in payloads. I don't think it's harmful to keep 
PayloadSorter, but I don't mind removing it as well.

bq. Remove IndexSorter.java

IndexSorter is a convenient utility for sorting a Directory end-to-end. Why 
remove it? On the opposite, I was thinking if we want to make it more of an 
instance utility, i.e. that you do something like {{new IndexSorter().sort()}} 
and perhaps allow to sort a Directory in-place (by opening an IW, deleteAll() 
and addIndexes SortingReader...).

bq. make SortDoc package-private

SortDoc, while not visible on the API today, might be useful for Sorter 
implementations, as a convenient way to create the old2new[]. Otherwise, if you 
need to sort both 'docs' and 'values', you need to work with something similar 
to SorterTemplate. I can remove it and implement sorting docs[] and values[] by 
each Sorter impl, or make Sorter an abstract class (parameterized with {{T 
exnteds Comparable<T>}} which does the sorting for you?

bq. Maybe we could check if the docs enum to reuse is an instance of 
SortingDocsEnum and reuse its wrapped DocEnum?

Yeah, I've been thinking about it while writing the comment. Since 
FilterDocsEnum doesn't expose 'in' in a public way, I was wondering if I should 
expose the wrapped 'in' in SortingXYZ just for that purpose. How important is 
it to reuse DocsEnum/AndPositions?
                
> Port index sorter to trunk APIs
> -------------------------------
>
>                 Key: LUCENE-3918
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3918
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: modules/other
>    Affects Versions: 4.0-ALPHA
>            Reporter: Robert Muir
>             Fix For: 4.2, 5.0
>
>         Attachments: LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch, 
> LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch, 
> LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch
>
>
> LUCENE-2482 added an IndexSorter to 3.x, but we need to port this
> functionality to 4.0 apis.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to