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

Adrien Grand commented on LUCENE-9280:
--------------------------------------

Woohoo. I can try to give a little more background about this feature. The 
question that usually comes first is the benefit of this approach compared to 
index sorting. Index sorting provides greater speedups than this change, but is 
limited to one field and one sort order. While it's possible to create multiple 
indexes that all have a different sort order, it's quite expensive in terms of 
resources, and creates new problems e.g. if you need all your indices to have a 
consistent view of the documents that exist in the index. Even if you only sort 
by a single field, this feature might be relevant. For instance with time 
series, it's common to sort data by descending timestamp, e.g. to live-tail 
events that match a filter, but you sometimes also need to sort in ascending 
order to find the first occurrence of a problem, which is often a useful piece 
of information for root cause analysis. With index sorting, sorting in reverse 
order of the index sort is a worst-case scenario.

The approach to store min/max values per block in doc values would work too. 
Something I like with this approach is that it doesn't require adding new APIs 
to doc values, and that it doesn't only work with numbers. For instance, this 
approach could also be used to speed up sorting by geo-distance too (using the 
same principle as LatLonPointDistanceFeatureQuery) without requiring the 
introduction of a new type of doc values that supports multiple dimensions.

> Add ability to skip non-competitive documents on field sort 
> ------------------------------------------------------------
>
>                 Key: LUCENE-9280
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9280
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Mayya Sharipova
>            Priority: Minor
>          Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> Today collectors, once they collect enough docs, can instruct scorers to 
> update their iterators to skip non-competitive documents. This is applicable 
> only for a case when we need top docs by _score.
> It would be nice to also have an ability to skip non-competitive docs when we 
> need top docs sorted by other fields different from _score. 



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