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

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

bq. Maybe a List instead of an array would be even better

The thing is, I use two parallel arrays to sort the documents (docs and values) 
and SorterTemplate swaps entries in the arrays, so I think that kinda means we 
need to load everything into memory (well, certainly we cannot swap entries on 
disk)? But this is just the initial loading used to determine the docs order 
... and also, someone can implement a Sorter.oldToNew without loading anything 
into RAM, but I doubt if anyone will.

As for IndexSorter utility, I thought about adding main(), but then sortField 
is not enough (only works for NumericDV). On the other hand, I do get your 
point that there's not much use for a Java API that takes Directory-ies... and 
I don't want to add API that takes reader/writer and only calls .addIndexes. So 
one option is to remove the class, but still keep a test around which does the 
addIndexes to make sure it works.

I don't want however to add a main that is limited to NumericDV ... and I do 
think that stored fields / payload value are viable options. At least, stored 
field is, I can let go of the payload, if that really bothers anyone.
                
> 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-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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to