lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2051) Contrib Analyzer Setters should be deprecated and replace with ctor arguments
Date Tue, 10 Nov 2009 22:15:28 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776107#action_12776107
] 

Robert Muir commented on LUCENE-2051:
-------------------------------------

I agree. Any one analyzer should really just serve as an example of how to put tokenstreams
together.
They shouldn't try to meet all users needs, but instead be very simple and easy for the user
to customize.

This complexity caused by setters was painful when implementing reusableTokenStream, these
setters require special handling and code complexity.
and there might even still be some bug I introduced in this process, we try our best but these
setters make life very complex.

I would like to see these setters deprecated for 3.0 so that code will be simpler in the future.


> Contrib Analyzer Setters should be deprecated and replace with ctor arguments
> -----------------------------------------------------------------------------
>
>                 Key: LUCENE-2051
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2051
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/analyzers
>    Affects Versions: 2.9.1
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 3.0
>
>
> Some analyzers in contrib provide setters for stopword / stem exclusion sets / hashtables
etc. Those setters should be deprecated as they yield unexpected behaviour. The way they work
is they set the reusable token stream instance to null in a thread local cache which only
affects the tokenstream in the current thread. Analyzers itself should be immutable except
of the threadlocal. 
> will attach a patch soon.

-- 
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


Mime
View raw message