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

Atri Sharma commented on LUCENE-8857:
-------------------------------------

Attached is a patch implementing this technique. It adds default 
implementations for the predicates handling shard index and docID tie breakers.

 

Note that setShardIndex is still present, but is only used for controlling if 
shard indices should be set or not. It is totally doable to ask TopDocs#merge 
to set shard indices but still tie break on docIDs.

If this approach seems fine, I will add more javadocs and tests.

 

[^LUCENE-8857.patch]

> Refactor TopDocs#Merge To Take In Custom Tie Breakers
> -----------------------------------------------------
>
>                 Key: LUCENE-8857
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8857
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Atri Sharma
>            Priority: Major
>         Attachments: LUCENE-8857.patch
>
>
> In LUCENE-8829, the idea of having lambdas passed in to the API to allow 
> finer control over the process was discussed.
> This JIRA tracks adding a parameter to the API which allows passing in 
> lambdas to define custom tie breakers, thus allowing users to do custom 
> algorithms when required.
> CC: [~jpountz]  [~simonw] 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to