You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Alan Woodward (Jira)" <ji...@apache.org> on 2021/04/29 08:49:00 UTC
[jira] [Resolved] (LUCENE-9940) The order of disjuncts in
DisjunctionMaxQuery affects equals() impl
[ https://issues.apache.org/jira/browse/LUCENE-9940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Woodward resolved LUCENE-9940.
-----------------------------------
Fix Version/s: main (9.0)
Resolution: Fixed
> The order of disjuncts in DisjunctionMaxQuery affects equals() impl
> -------------------------------------------------------------------
>
> Key: LUCENE-9940
> URL: https://issues.apache.org/jira/browse/LUCENE-9940
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Alan Woodward
> Assignee: Alan Woodward
> Priority: Major
> Fix For: main (9.0)
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> DisjunctionMaxQuery stores its disjuncts in a java array, and its equals() implementation uses Arrays.equal() when checking equality. This means that two queries with the same disjuncts but added in a different order will compare as different, even though their results will be identical. We should replace the array with a Set.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org