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

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

Well, in theory, one could do the following:

* Let segments be flushed unsorted
* During merge, open an AtomicReader which detects that it's an unsorted 
segment and build the old2New[], reading the documents in the right order
* Provide his own SegmentMerger which doesn't append seg2 after seg1, but 
rather does a true "merge" of the two, by comparing the sort-by-value of each 
document

But that's all in theory, none of the API exist today. Also, even if you did 
that, your index would still be unsorted, because a sorted segment says nothing 
about the total sort order of the index...
                
> 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-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