You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/07/31 18:14:00 UTC

[jira] [Commented] (LUCENE-9384) Backport for the field sort optimization of LUCENE-9280

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

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

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

LUCENE-9384: Backport for field sort optimization (#1610)

Backport for: LUCENE-9280: Collectors to skip noncompetitive documents (#1351)

Similar how scorers can update their iterators to skip non-competitive
documents, collectors and comparators should also provide and update
iterators that allow them to skip non-competive documents.

To enable sort optimization for numeric sort fields,
the following needs to be done:
1) the field should be indexed with both doc_values and points, that
must have the same field name and same data
2) SortField#setCanUsePoints must be set
3) totalHitsThreshold should not be set to max value.

> Backport for the field sort optimization of LUCENE-9280
> -------------------------------------------------------
>
>                 Key: LUCENE-9384
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9384
>             Project: Lucene - Core
>          Issue Type: Task
>    Affects Versions: 8.x
>            Reporter: Mayya Sharipova
>            Priority: Minor
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Field sort optimization implemented in LUCENE-9280 is based on an assumption that if a numeric field is indexed with both doc values and points, the *same data* is stored in these points and doc values.  While there is  a plan in LUCENE-9334 to enforce this consistency from Lucene 9.0, there is nothing in Lucene 8.x to enforce this assumption.
>  
> Thus in order to backport the sort optimization to 8.x, we need to make a user to explicitly opt in for it. This could be done by either:
>  * introducing a special SortField (e.g. DocValuesPointSortField) that will use optimization
>  * introduce a bool parameter to a SortField which when true will indicate that the sort optimization should be enabled (e.g. SortField("my_field", SortField.Type.LONG, true))
>  



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

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