lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earwin Burrfoot <ear...@gmail.com>
Subject Re: deprecating Versions
Date Mon, 29 Nov 2010 12:21:04 GMT
> I'm talking about the analyzers we provide in lucene itself.
> there is no reason, no advantage towards these being .java code: it
> just causes problems.

I see little difference between

public class StockAnalyzers {
  public static final Analyzer STANDARD_30 = new AnalyzerBuilder().
    add(new WhiteSpaceTokenizer(LUCENE_30)).
    build();
}

and

<stock-analyzers>
  <analyzer name = "Standard_30">
    <tokenizer class = "lucene.WhiteSpaceTokenizer">
      <param name = "version" value = "3.0" />
    </tokenizer>
  </analyzer>
</stock-analyzers>

except latter is more verbose and former is more easily
understandable, copypaste-and-tweakable and refactorable

There's no reason, no advantage towards using .xml files for
configuration, when said configuration can easily be expressed
programmatically. It just causes problems :)

-- 
Kirill Zakharenko/Кирилл Захаренко (earwin@gmail.com)
Phone: +7 (495) 683-567-4
ICQ: 104465785

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


Mime
View raw message