You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2013/03/16 15:28:13 UTC

[jira] [Commented] (LUCENE-4839) Sorter API: Use TimSort to sort doc IDs and postings lists

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

Uwe Schindler commented on LUCENE-4839:
---------------------------------------

If you want to port TimSort to Lucene, would it be possible to do it based on SorterTemplate? So you could implement SorterTemplate and use it like: new SorterTemplate(){ ... }.timSort(from,to)
                
> Sorter API: Use TimSort to sort doc IDs and postings lists
> ----------------------------------------------------------
>
>                 Key: LUCENE-4839
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4839
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>
> TimSort (http://svn.python.org/projects/python/trunk/Objects/listsort.txt, used by python and Java's Arrays.sort(Object[]) in particular) is a sorting algorithm that performs very well on partially-sorted data. Indeed, with TimSort, sorting an array which is in reverse order or a finite concatenation of sorted arrays is a linear operation (instead of O(n ln(n))).
> The sorter API could benefit from this algorithm when using Sorter.REVERSE_DOCS or merging several sorted readers for example.

--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org