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

ASF subversion and git services commented on LUCENE-9330:
---------------------------------------------------------

Commit ad0cefb8ec279e4fae0b104d487deb36ff2f9d27 in lucene-solr's branch 
refs/heads/branch_8x from Alan Woodward
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=ad0cefb ]

LUCENE-9330: Make SortFields responsible for index sorting and serialization 
(#1440)

This commit adds a new class IndexSorter which handles how a sort should be 
applied
to documents in an index:

* how to serialize/deserialize sort info in the segment header
* how to sort documents within a segment
* how to sort documents from merging segments

SortField has a getIndexSorter() method, which will return null if the sort 
cannot be used
to sort an index (eg if it uses scores or other query-dependent values). This 
also requires a
new Codec as there is a change to the SegmentInfoFormat


> Make SortField responsible for index sorting
> --------------------------------------------
>
>                 Key: LUCENE-9330
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9330
>             Project: Lucene - Core
>          Issue Type: Sub-task
>            Reporter: Alan Woodward
>            Priority: Major
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> Index sorting is currently handled inside Sorter and MultiSorter, with 
> hard-coded implementations dependent on SortField types.  This means that you 
> can't sort by custom SortFields, and also that the logic for handling 
> specific sort types is split between several unrelated classes.
> SortFields should instead be able to implement their own index sorting 
> methods.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to