[ 
https://issues.apache.org/jira/browse/LUCENE-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004714#comment-13004714
 ] 

Paul Elschot commented on LUCENE-2945:
--------------------------------------

bq. The Query class already is cloneable so it needs to support what the 
QueryUtils is doing.

Would that include throwing a CloneNotSupportedException?


For these classes I could not find a better name in their package when I wrote 
this.
Also I wanted the possibility to generate a query for another engine,
so I needed an (factory) layer between the parser and the final query.
There is already a BasicQueryFactory in there that generates Lucene TermQuery 
and SpanTermQuery leaf objects,
so perhaps the other Lucene Query objects could also be made there.
These others are objects of the inner classes that need hashCode() and equals() 
here, and Lucene BooleanQuery objects.
This could be a spin off issue.

> Surround Query doesn't properly handle equals/hashcode
> ------------------------------------------------------
>
>                 Key: LUCENE-2945
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2945
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 3.0.3, 3.1, 4.0
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 3.1.1, 4.0
>
>         Attachments: LUCENE-2945-partial1.patch, LUCENE-2945.patch, 
> LUCENE-2945.patch, LUCENE-2945.patch
>
>
> 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: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to