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

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

Commit 69de1a490f4b78ca6479f944f495f4f4beb80771 in lucene-solr's branch 
refs/heads/master from Mayya Sharipova
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=69de1a4 ]

LUCENE-9599 Disable sort optim on index sort (#2075)

Disable sort optimization in comparators on index sort.

Currently, if search sort is equal or a part of the index sort, we have
an early termination in TopFieldCollector.
But comparators are not aware of the index sort, and may run
sort optimization even if the search sort is congruent with
the index sort.

This patch:
- adds `disableSkipping` method to `FieldComparator`,
 This method is called by `TopFieldCollector`, and currently called 
  when  the search sort is congruent with the index sort,
  but more conditions can be added. 
- disables sort optimization in comparators in this case.
- removes a private  `MultiComparatorLeafCollector` class, because the only
  class that extends `MultiComparatorLeafCollector` was `TopFieldLeafCollector`.
  The logic of the deleted `TopFieldLeafCollector` is added to 
`TopFieldLeafCollector`.

Relates to #1351

> Disable sort optimization in comparators on index sort
> ------------------------------------------------------
>
>                 Key: LUCENE-9599
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9599
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mayya Sharipova
>            Priority: Minor
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> LUCENE-9280 introduced an ability for comparators to skip non-competitive 
> documents. But currently comparators are not aware of index sorting, and can 
> run sort optimization even when search sort is congruent with the index sort.
> As the early termination in this case is already handled in 
> TopFieldCollector, we need to disable sort optimization in comparators. 



--
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