Hi there,
Hopefully I'm not misunderstanding the situation but after playing around
with cache warming in Solr I found that the order of the Query objects
within the filters list makes a difference to the equals() and hashCode()
methods.
Query query = new TermQuery(new Term(field1, value1));
I've opened SOLR-2716 (https://issues.apache.org/jira/browse/SOLR-2716).
Would it be possible to use a custom class or List implementation which
generates a hash code in such a way that the order they are combined makes
no difference? The change only really needs to effect whether a key is
: Improvement
Components: search
Affects Versions: 3.3
Reporter: Neil Prosser
Priority: Minor
The hashCode() and equals() methods of a QueryResultKey are dependent on the
order of the filters meaning that potentially identical result sets are missed
when cached
[
https://issues.apache.org/jira/browse/SOLR-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neil Prosser updated SOLR-2716:
---
Description:
The hashCode() and equals() methods of a QueryResultKey are dependent on the
order
[
https://issues.apache.org/jira/browse/SOLR-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neil Prosser updated SOLR-2716:
---
Attachment: SOLR-2716.patch
QueryResultKey hashCode() and equals() is dependent on filter order
[
https://issues.apache.org/jira/browse/SOLR-2716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13090876#comment-13090876
]
Neil Prosser commented on SOLR-2716:
Half-baked and my first Solr patch so hopefully