lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <>
Subject [jira] Commented: (LUCENE-2945) Surround Query doesn't properly handle equals/hashcode
Date Tue, 01 Mar 2011 19:36:36 GMT


Paul Elschot commented on LUCENE-2945:

This one is in the category oversights that will come back to haunt :(

I found 15 occurrences in the Surround source code of this regex for method definitions:
Query .*makeLucene.*Query

Of these, the following actually lack equals/hash:
DistanceQuery line 76 (as above) and SimpleTerm line 78.
Taking a closer look at both, the underlying reason why hash/equals is needed is the implementation
of Query.rewrite().
These are the only ones in Surround that do that, so they should indeed be the only culprits

I´ll provide a patch to implement hash/equals for them.

> Surround Query doesn't properly handle equals/hashcode
> ------------------------------------------------------
>                 Key: LUCENE-2945
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 3.0.3, 4.0
>            Reporter: Grant Ingersoll
>            Priority: Minor
> In looking at using the surround queries with Solr, I am hitting issues caused by collisions
due to equals/hashcode not being implemented on the anonymous inner classes that are created
by things like DistanceQuery (branch 3.x, near line 76)

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message