On Fri, Apr 3, 2015 at 12:10 AM, Reitzel, Charles
<charles.reit...@tiaa-cref.org> 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.

-- 
Adrien

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

Reply via email to