lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Ferenczi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7707) Only assign ScoreDoc#shardIndex if it was already assigned to non default (-1) value
Date Thu, 23 Feb 2017 17:14:44 GMT

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

Jim Ferenczi commented on LUCENE-7707:
--------------------------------------

bq. Plus I think it's very unlikely someone today is pre-setting the shardIndex (off of it's
default -1 value) and then relying on TopDocs.merge

Good point. +1 to the patch too, there's nothing to break here ;)


> Only assign ScoreDoc#shardIndex if it was already assigned to non default (-1) value
> ------------------------------------------------------------------------------------
>
>                 Key: LUCENE-7707
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7707
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Simon Willnauer
>             Fix For: master (7.0), 6.5.0
>
>         Attachments: LUCENE-7707.patch, LUCENE-7707.patch
>
>
> When you use TopDocs.merge today it always overrides the ScoreDoc#shardIndex value. The
assumption that is made here is that all shard results are merges at once which is not necessarily
the case. If for instance incremental merge phases are applied the shard index doesn't correspond
to the index in the outer TopDocs array. To make this a backwards compatible but yet non-controversial
change we could change the internals of TopDocs#merge to only assign this value unless it's
not been assigned before to a non-default (-1) value to allow multiple or sparse top docs
merging.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message