: Why instead of that we don't create an UbberFactory that takes the Tokenizer
: class as a parameter and instantiates the proper Tokenizer?

The idea has come up before ... and there's really no reason why it
wouldn't be okay to include a reflection based facotry like this in Solr
-- it just hasn't been done yet.

One of the reasons is that there are some performance costs associated
with the reflection, so we wouldn't want to competley replace the existing
"configuration via factory name" model with a "configure via class name
and an uber factory does the reflection quetly in the background" model
because it's the kind of appraoch that would really only make sense for
simple prototypes -- in any system where you are really concerned about
performacne, reflection on every analyzer call would probably be pretty
expensive.  (allthough i'd love to see benchmarks prove me wrong)

Another question in my mind is "why doesn't solr provide an optional jar
with factories for every tokenizer/tokenfilter in the lucene contribs?"
... the only answer to that is that no one has bothered to crank out a
patch that does it.

http://www.nabble.com/Re%3A-making-schema.xml-nicer-to-read-use-p5939980.html
http://www.nabble.com/foo-tf1737025.html#a4720545


-Hoss

Reply via email to