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

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

[~simonw] The reason I did not add a default comparator for shard indices is 
because we would need the logic for tie breaking within a shard. The idea there 
was that users passing in custom tie breakers would be responsible for ensuring 
the sanity of their algorithms.

 

I have changed the patch now to always treat hitIndex as the second level tie 
breaker i.e. when the passed in comparator returns 0, use hit index as the tie 
breaker, irrespective of what the tiebreaker used as the primary tie breaking 
algorithm.

 

[^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, LUCENE-8857.patch, LUCENE-8857.patch, 
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to