[
https://issues.apache.org/jira/browse/LUCENE-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15108358#comment-15108358
]
Adrien Grand commented on LUCENE-6984:
--------------------------------------
The way I see it, queries should be considered immutable once created, so it is
a bug that SpanMTQWrapper modifies the query that is passed in its constructor.
Removing the hashcode cache could help fix the bug that you hit but then I am a
bit afraid that this would still be an issue for simple search use-cases
because of filter caching. Maybe a way to fix it would be for SpanMTQWrapper to
have its own MTQ wrapper that allows to override the rewrite method of the
query that is provided?
> MultiTermQuery mutability can cause assertion failures in BooleanQuery
> ----------------------------------------------------------------------
>
> Key: LUCENE-6984
> URL: https://issues.apache.org/jira/browse/LUCENE-6984
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Alan Woodward
>
> BooleanQuery caches its hashcode on the grounds that it is immutable.
> However, this immutability doesn't hold if some of its clauses hold queries
> that are not themselves immutable - for example, a MultiTermQuery with a
> changeable rewrite method. If one of these clauses is mutated after the
> hashcode has been calculated, then the next time the parent BooleanQuery is
> used the assertion in BooleanQuery.hashCode() will fail.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]