You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2008/10/09 02:59:44 UTC

[jira] Commented: (LUCENE-1415) MultiPhraseQuery has incorrect hashCode() implementation - Leads to Solr Cache misses

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

Yonik Seeley commented on LUCENE-1415:
--------------------------------------

Good catch Todd,  this can be demonstrated in Solr with the example server and a query of
http://localhost:8983/solr/select/?q=ccc
(ccc has synonyms which end up creating a MultiPhraseQuery)

> MultiPhraseQuery has incorrect hashCode() implementation - Leads to Solr Cache misses
> -------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1415
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1415
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.4
>            Reporter: Todd Feak
>
> I found this while hunting for the cause of Solr Cache misses.
> The MultiPhraseQuery class hashCode() implementation is non-deterministic. It uses termArrays.hashCode() in the computation. The contents of that ArrayList are actually arrays themselves, which return there reference ID as a hashCode instead of returning a hashCode which is based on the contents of the array. I would suggest an implementation involving the Arrays.hashCode() method.
> I will try to submit a patch soon, off for today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org