On 8/22/06, Yonik Seeley <[EMAIL PROTECTED]> wrote:
What do people thing of leaving off "Factory" from tokenizers and
token filters in schema.xml.
Let the user say what filter they want, not necessarily how to get it.

So you would say "LowerCaseFilter" instead of "LowerCaseFilterFactory".

Implementation details:
  - Specification of a Factory would still be accepted (100% backward compat)
  - if the specified class name isn't found, or doesn't implement
TokenFilterFactory then a factory will be searched for by appending
"Factory" to the class name.
 - if no factory can be found, an attempt will be made to construct
one dynamically (easiest would be to create a generic factory that
works via reflection).  People could use simple filters w/o creating a
factory for it.

+0

This change would definately improve the flow of schema.xml, at the
expense of making the object instantiation somewhat more obscure.  I
envision people creating a custom filter and not realizing that
initialization costs can be reduced by constructing corresponding
Factory in the same package.  But this shouldn't be too much of an
issue ˆf it is well-documented in the sample schema.xml.

regards,
-Mike

Reply via email to