Skip to content

LUCENE-9940: DisjunctionMaxQuery shouldn't depend on disjunct order for equals checks#110

Merged
romseygeek merged 3 commits into
apache:mainfrom
romseygeek:bug/dismax-order-equals
Apr 29, 2021
Merged

LUCENE-9940: DisjunctionMaxQuery shouldn't depend on disjunct order for equals checks#110
romseygeek merged 3 commits into
apache:mainfrom
romseygeek:bug/dismax-order-equals

Conversation

@romseygeek

Copy link
Copy Markdown
Contributor

DisjunctionMaxQuery stores its disjuncts in a Query[], and uses
Arrays.equals() for comparisons in its equals() implementation.
This means that the order in which disjuncts are added to the query
matters for equality checks.

This commit changes DMQ to instead store its disjuncts in a Multiset,
meaning that ordering no longer matters. The getDisjuncts()
method now returns a Collection<Query> rather than a List, and
some tests are changed to use query equality checks rather than
iterating over disjuncts and expecting a particular order.

@romseygeek romseygeek self-assigned this Apr 28, 2021
@romseygeek romseygeek merged commit f7a3587 into apache:main Apr 29, 2021
@romseygeek romseygeek deleted the bug/dismax-order-equals branch April 29, 2021 08:47
janhoy pushed a commit to cominvent/lucene that referenced this pull request May 12, 2021
… thread so the PKI Interceptor is activated to allow PULL replicas to replicate from security-enabled leaders (apache#110)
janhoy pushed a commit to cominvent/lucene that referenced this pull request May 12, 2021
…r server thread so the PKI Interceptor is activated to allow PULL replicas to replicate from security-enabled leaders (apache#110)"

To address review comments after merge.

This reverts commit d316946.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants