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
method.

  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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to