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

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

Commit 7b3dbfedd95135aecaa4dca053cc63aabb422f24 in lucene-solr's branch 
refs/heads/branch_8x from Mayya Sharipova
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=7b3dbfe ]

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

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`, when the search sort
is congruent with the index sort.
It is also called when we can't use points for sort optimization.
- disables sort optimization in comparators in these cases.

Relates to #1351
Backport for #2075

> 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: 3h 50m
>  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