You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cédrik LIME (JIRA)" <ji...@apache.org> on 2008/04/22 12:02:21 UTC

[jira] Created: (LUCENE-1269) Analysers and Filters should not be final

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


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


[jira] Commented: (LUCENE-1269) Analysers and Filters should not be final

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ 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


[jira] Updated: (LUCENE-1269) Analysers and Filters should not be final

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll updated LUCENE-1269:
------------------------------------

    Priority: Minor  (was: Major)

> 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


[jira] Commented: (LUCENE-1269) Analysers and Filters should not be final

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591893#action_12591893 ] 

Grant Ingersoll commented on LUCENE-1269:
-----------------------------------------

Can you submit a patch?  I guess I don't see any reason they need to be final, but I am always paranoid that somebody had to have a reason at the time.

> 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