[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-dev
Subject:    [jira] Commented: (LUCENE-1269) Analysers and Filters should not be
From:       "Hoss Man (JIRA)" <jira () apache ! org>
Date:       2008-04-27 23:06:55
Message-ID: 1169640139.1209337615749.JavaMail.jira () brutus
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/LUCENE-1269?page=com.atlassian.jira.plugin \
.system.issuetabpanels:comment-tabpanel&focusedCommentId=12592693#action_12592693 ] 

Hoss Man commented on LUCENE-1269:
----------------------------------

the general reason why things are final is to protect the lucene devs from needing to \
maintain compatibility when making perf improvements or adding functionality.

Conventional wisdom also says that Analyzers rarely need to be extended because it's \
generally better for users to compose their own using the underlying TokenFilters -- \
FrenchAnalyzer is a great example of that.  Anything you might do in a subclass can \
be done just as easily and with about the same amount of code if you write your own \
Analyzer that uses the same underlying TokenFilters.

Any class that is currently final can be made non-final, but doing so requires a \
careful API review to ensure that the public and protected methods are things that we \
really want to be exposed to (and over ridable by) subclasses.

(going back to the specific example of FrenchAnalyzer: i see no reason not to remove \
"final" .. but i would still encourage people to write their own Analyzer instead of \
subclassing it)


> Analysers and Filters should not be final
> -----------------------------------------
> 
> Key: LUCENE-1269
> URL: https://issues.apache.org/jira/browse/LUCENE-1269
> Project: Lucene - Java
> Issue Type: Bug
> Components: Analysis
> Affects Versions: 2.3.1
> Reporter: Cédrik LIME
> Priority: Minor
> 
> I am trying to extend some Lucene Analysers to further improve their behaviour. \
> However, some Analysers and Filters are final classes that I cannot extend (thus \
> resorting to copying the class, which is less than optimal). Any reason we would \
> want to inhibit people from extending a class like FrenchAnalyzer? Could me make \
> all Analysers and Filters in the contrib-analysis package non-final?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic