atom feed20 messages in org.apache.lucene.solr-devRe: [DISCUSS] Change Query API to mak...
FromSent OnAttachments
Adrien GrandMar 31, 2015 2:10 am 
Michael McCandlessMar 31, 2015 2:18 am 
Robert MuirMar 31, 2015 4:21 am 
Mark MillerMar 31, 2015 6:36 am 
Terry SmithMar 31, 2015 6:37 am 
Adrien GrandMar 31, 2015 6:44 am 
Reitzel, CharlesMar 31, 2015 7:12 am 
Terry SmithMar 31, 2015 7:32 am 
Adrien GrandMar 31, 2015 7:51 am 
Adrien GrandMar 31, 2015 8:06 am 
davi...@gmail.comApr 1, 2015 12:25 pm 
Adrien GrandApr 2, 2015 12:40 am 
Michael McCandlessApr 2, 2015 12:56 am 
davi...@gmail.comApr 2, 2015 6:27 am 
Yonik SeeleyApr 2, 2015 6:43 am 
Robert MuirApr 2, 2015 6:45 am 
davi...@gmail.comApr 2, 2015 11:21 am 
Reitzel, CharlesApr 2, 2015 3:10 pm 
Adrien GrandApr 2, 2015 3:23 pm 
Robert MuirApr 3, 2015 4:21 am 
Subject:Re: [DISCUSS] Change Query API to make queries immutable in 6.0
From:Adrien Grand (jpou@gmail.com)
Date:Mar 31, 2015 7:51:09 am
List:org.apache.lucene.solr-dev

Hi Charles,

On Tue, Mar 31, 2015 at 4:12 PM, Reitzel, Charles <Char@tiaa-cref.org> wrote:

Am I missing something? Across the project, I’m seeing over 1,000 references
to BooleanQuery.add(). Already, this seems like a pretty major refactoring.
And I haven’t checked the other types of queries: DisjunctionMax, Phrase, and
MultiPhrase. At that scale, bugs will be introduced.

I’m not disagreeing with the concept. At all. It’s part of the Collections
contract that anything used in hashCode() and equals() be kept immutable. Just
wondering if the cost is worth the principle this time?

The majority of call sites are in test folders. This does not make the change easier but it decreases the chances to introduce an actual bug. Also, the queries that we need to modify are those that are best tested so I'm quite confident that this change will not be a bug nest.

However I totally agree that the change it huge, this is why I asked for opinions on the list before doing it actually doing it.