[ 
https://issues.apache.org/jira/browse/LUCENE-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13117360#comment-13117360
 ] 

Robert Muir commented on LUCENE-3474:
-------------------------------------

sure, I'd be happy too... was gonna wait a little bit to see if anyone grossly 
objected.

I still don't like the fact this dodges the builder discussion completely, but 
again my real opinion for the record:
* I myself have added builders to lucene: 
  # PrefixCodedTerms.Builder: 
http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/PrefixCodedTerms.java
  # SynonymMap.Builder: 
http://svn.apache.org/repos/asf/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
* Pretty sure Mike added FST.Builder too!
* In these cases i think builder is appropriate: its building a complex thing 
up thru a series of add()s or whtaever and then finalizing into an immutable 
thing (trie or FST).
* my problems with Builder are I feel its only appropriate if you are actually 
Building something. I dont think having 2 booleans counts as 'building', and 
I().dont().want().lucenes().code().to().read().like().this() ... i think 
chaining only makes sense in certain cases like StringBuilder, but *NOT* for 
building an FST for example.
* The builders i mentioned don't create objects on every add() or set(), and 
they aren't going to be in anyone's tight loop, so I think they make perfect 
sense.

So really my opinion on Builders is no different than my opinion on ArrayList: 
you use them when its the appropriate solution and when it makes sense... I 
think thats when you are actually building stuff.

                
> pass liveDocs Bits down in scorercontext, instead of Weights pulling from the 
> reader 
> -------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3474
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3474
>             Project: Lucene - Java
>          Issue Type: Task
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>         Attachments: LUCENE-3474.patch, LUCENE-3474.patch
>
>
> Spinoff from LUCENE-1536, this would allow filters to work in a more flexible 
> way (besides just cleaning up)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to