lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laimonas Simutis <lai...@gmail.com>
Subject Possible Query Equals bug
Date Sat, 20 Dec 2014 12:48:26 GMT
I am going through the failing tests and seeing if I can fix them. While
looking at the TestDrillDownQuery (
https://github.com/apache/lucenenet/blob/master/src/Lucene.Net.Tests/core/Facet/TestDrillDownQuery.cs)
I noticed that all of the failures in there are caused by a modification to
Query class implementation of Equals.

The commit that contains possible offending code is here:

https://github.com/apache/lucenenet/commit/a37fd3810e630560f209175bb5897975c21c57a2#diff-83ac470f4ea73edd2b7e2d6bf9190ba7

It removes "if (this.GetType() != obj.GetType())" check that is present in
java version.

The tests mentioned above fail because of the check not being made.
QueryUtils.CheckHashEquals ends up comparing queries with the same boost
value but of different type, expectation is for such queries to come back
as not equal. Without type check, they evaluate as equal.

I added the type check back in and the tests pass.

Should I go through branch / PR dance for such a small change? If this is a
legitimate problem and I haven't missed anything, perhaps it would be
easiest for one of you with commit rights to check it in.


Thank you,

Laimonas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message