[ https://issues.apache.org/jira/browse/LUCENE-9381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17116592#comment-17116592 ]
Alan Woodward commented on LUCENE-9381: --------------------------------------- I opened a PR: https://github.com/apache/lucene-solr/pull/1537 Some comments: * we still have a `getReverse()` method on SortOrder, but I'd like to remove that in a follow up - sort orders should be able to cope with ascending/descending sorts within their comparator functions. * this makes Sort itself shallowly immutable, and as we move various sorts to implement SortOrder rather than extending SortField we can make them immutable as well. It also removes a whole bunch of outdated javadoc on Sort, including my favourite doc line "you can re-use a Sort by changing its sort fields/this object is thread-safe" * SortOrder has a name() method which is separate from its toString() implementation. This is for distributed sorts to use as a key - toString() contains information about the source field, but also asc/desc and missing values, which you probably don't want when displaying sort values in results. > Extract necessary SortField methods into a new interface > -------------------------------------------------------- > > Key: LUCENE-9381 > URL: https://issues.apache.org/jira/browse/LUCENE-9381 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Alan Woodward > Assignee: Alan Woodward > Priority: Major > > Step 2 of LUCENE-9326. SortField has a bunch of cruft on it that makes > creating new sorts overly complicated. This ticket will extract a new > SortOrder interface from SortField that only contains the methods necessary > for implementing a sort. -- 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