[ https://issues.apache.org/jira/browse/LUCENE-8819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16855904#comment-16855904 ]
Atri Sharma commented on LUCENE-8819: ------------------------------------- [~ivera] Yes, you should not be getting different results. Note that the results themselves are not different in this case (I verified that by printing the results per searcher) but the same problem as TestTopDocsMerge – for a null sort order, shardIndex comes into play when tie breaking on equal scores. However, shardIndex is a tricky one – it is assigned based on the position of the originating collector where the hit occured in the overall array of Collectors. Hence, the order in which the results are returned is different. I will look into this a bit more. I think that the dependency on shardIndex as a tie breaker is a bit gray – why would you want to tie break on something that is viable to change and is volatile? Why not tie break on docID instead, which is the de facto standard (AFAIK, TopDocs assumes that documents are collected in docID order, so why not use it as a tie breaker? > org.apache.lucene.search.TestTopDocsMerge.testSort_1 failure > ------------------------------------------------------------ > > Key: LUCENE-8819 > URL: https://issues.apache.org/jira/browse/LUCENE-8819 > Project: Lucene - Core > Issue Type: Bug > Reporter: Ignacio Vera > Priority: Major > Attachments: LUCENE-8819.patch > > > It can be reproduced with: > > {code:java} > ant test -Dtestcase=TestTopDocsMerge -Dtests.method=testSort_1 > -Dtests.seed=E916688CE5BC9122 -Dtests.multiplier=3 -Dtests.slow=true > -Dtests.locale=es-US -Dtests.timezone=Pacific/Johnston -Dtests.asserts=true > -Dtests.file.encoding=ISO-8859-1{code} > > Test fails in master and branch 8.x but it does not fail in branch 8.1. -- 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