lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <>
Subject Re: [DISCUSS] Change Query API to make queries immutable in 6.0
Date Thu, 02 Apr 2015 22:23:44 GMT
On Fri, Apr 3, 2015 at 12:10 AM, Reitzel, Charles
<> wrote:
> Unfortunately, since boost is used in hashCode() and equals() calculations, changing
the boost will still make the queries "trappy".   You will do all that work to make everything-but-boost
immutable and still not fix the problem.

This is why the query cache clones queries before putting them into
the cache and sets the boost to 1. The issue is that this clone method
is only shallow since its purpose is to change the boost. So it works
fine for the boost parameter but not for eg. boolean clauses.

Again, I don't dismiss advantages of going fully immutable, I'm just
arguing that making all queries immutable up to the boost would
already be a good improvement like Robert described. We can still
discuss about going fully immutable in a different issue, it would
benefit from the proposed change.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message