lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: Lucene 2.9 and deprecated methods
Date Sun, 04 Oct 2009 22:13:49 GMT
On Sun, Oct 04, 2009 at 03:04:13PM -0400, Mark Miller wrote:
> Earwin Burrfoot wrote:
> > As I stated in my last email, there's zero difference between
> > settings+static factory and builder except for syntax. Cannot
> > understand what Mark, Mike are arguing about.
> >   
> Sounds like we are arguing that we don't like the syntax then...

So, implement the static factory methods as wrappers around the builder

  public static IndexWriter open(Directory dir, Analyzer analyzer) {
    return open(new IndexManager(dir), dir, analyzer)

  public static IndexWriter open(IndexManager manager, Directory dir, 
                                 Analyzer analyzer) {
     return arch.buildIndexWriter(new Architecture(), manager, dir, analyzer);

  public static IndexWriter open(Architecture arch, IndexManager manager, 
                                 Directory dir, Analyzer analyzer) {
     return arch.buildIndexWriter(manager, dir, analyzer);

IMO, it's important not to force first-time users to grok builder classes in
order to perform basic indexing or searching.

Marvin Humphrey

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

View raw message