lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <>
Subject Re: Having a default constructor in Analyzers
Date Sun, 07 Feb 2010 17:49:43 GMT
Almost no Analyzer has a default ctor anymore due to the introduction
of Version. This should not be an issue for API users loading
Analyzers per reflection. You can still call the version Ctor
alternatively. Providing a default ctor with the current version could
be very risky in many regards, a backwards break based on version
could break older indexes etc etc.

I don't see that this keeps other applications from upgrading lucene.


On Sun, Feb 7, 2010 at 6:33 PM, Sanne Grinovero
<> wrote:
> Hello,
> I've seen that some core Analyzers are now missing a default
> constructor; this is preventing many applications to configure/load
> Analyzers by reflection, which is a common use case to have Analyzers
> chosen in configuration files.
> Would it be possible to add, for example, a constructor like
> public StandardAnalyzer() {
>   this(Version.LUCENE_CURRENT);
> }
> ?
> Of course more advanced use cases would need to pass parameters but
> please make the advanced usage optional; I have now seen more than a
> single project break because of this (and revert to older Lucene).
> Regards,
> Sanne
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message