lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: svn commit: r411882 - in /incubator/solr/trunk: CHANGES.txt src/java/org/apache/solr/analysis/ src/test/org/apache/solr/ src/test/test-files/
Date Mon, 05 Jun 2006 19:30:19 GMT
On 6/5/06, Chris Hostetter <> wrote:
> I just wish it wasn't neccessary to have all these Factories ... has
> anyone done any serious bnchmarking of the cost of reflection in a case
> like this? ... if getting a Class by name is the expensive part, we can do
> that once when the config is loaded -- it's just a question of how
> "clazz.newInstance() performs relative to "new Foo()"

A factory is certainly necessary sometimes.  You don't want to incur
setup time for creating a SynonymMap or a StopSet for every instance
you create.

For simpler tokenizers or token filters, it would be nice to be able
to use them directly.
Perhaps we could look at the class type, and if it's a lucene
Tokenizer or TokenFilter, try instantiating it directly with

At schema creation time, we should probably check if the specified
Tokenizer or TokenFilter has a default constructor.  If it doesn't we
should throw an error right then, not waiting for a confusing runtime


View raw message