lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Lucene 2.9 and deprecated IR.open() methods
Date Fri, 02 Oct 2009 23:29:22 GMT
> It is also probably a good idea to move various settings methods from
> IW to that builder and have IW immutable in regards to configuration.
> I'm speaking of the likes of setWriteLockTimeout, setRAMBufferSizeMB,
> setMergePolicy, setMergeScheduler, setSimilarity.
> 
> IndexWriter.Builder iwb = IndexWriter.builder().
>   writeLockTimeout(0).
>   RAMBufferSize(config.indexationBufferMB).
>   maxBufferedDocs(...).
>   similarity(...).
>   analyzer(...);
> 
> ... = iwb.build(dir1);
> ... = iwb.build(dir2);

A happy user of google-collections API :-) These builders are really cool!

Uwe



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


Mime
View raw message