You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Lance Norskog (JIRA)" <ji...@apache.org> on 2009/02/09 09:14:59 UTC
[jira] Created: (SOLR-1013) Scan code for equality implementation
mistakes
Scan code for equality implementation mistakes
----------------------------------------------
Key: SOLR-1013
URL: https://issues.apache.org/jira/browse/SOLR-1013
Project: Solr
Issue Type: Task
Affects Versions: 1.3
Reporter: Lance Norskog
Priority: Minor
Fix For: 1.5
In SolrIndexSearcher.java:getDocSet() we find 'absQ==query'. The Query classes have equals & hashcode implementations. This code apparently works now, but all of the code should use equals&hashcode instead of '=='.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-1013) Scan code for equality implementation
mistakes
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671869#action_12671869 ]
Yonik Seeley commented on SOLR-1013:
------------------------------------
This is an explicit reference check... getAbs either changes the query or doesn't:
{code}
// Get the absolute value (positive version) of this query. If we
// get back the same reference, we know it's positive.
Query absQ = QueryUtils.getAbs(query);
boolean positive = query==absQ;
{code}
> Scan code for equality implementation mistakes
> ----------------------------------------------
>
> Key: SOLR-1013
> URL: https://issues.apache.org/jira/browse/SOLR-1013
> Project: Solr
> Issue Type: Task
> Affects Versions: 1.3
> Reporter: Lance Norskog
> Priority: Minor
> Fix For: 1.5
>
>
> In SolrIndexSearcher.java:getDocSet() we find 'absQ==query'. The Query classes have equals & hashcode implementations. This code apparently works now, but all of the code should use equals&hashcode instead of '=='.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.