lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Itamar Syn-Hershko <ita...@code972.com>
Subject Re: Possible Query Equals bug
Date Sun, 21 Dec 2014 15:20:06 GMT
Yeah I can see the bug there, I was assuming GetType() will always return
typeof(Query), which is obviously wrong.

Are there other places where you see this change?

--

Itamar Syn-Hershko
http://code972.com | @synhershko <https://twitter.com/synhershko>
Freelance Developer & Consultant
Author of RavenDB in Action <http://manning.com/synhershko/>

On Sat, Dec 20, 2014 at 2:48 PM, Laimonas Simutis <laimis@gmail.com> wrote:

> 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