You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2013/06/13 02:58:20 UTC

[jira] [Commented] (SOLR-4872) Allow schema analysis object factories to be cleaned up properly when the core shuts down

    [ https://issues.apache.org/jira/browse/SOLR-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681816#comment-13681816 ] 

Benson Margulies commented on SOLR-4872:
----------------------------------------

Hoss is right that I made a mess of my original description. So I fixed the description.

So, let's imagine that the TokenizerChain (a subclass of Analyzer) class had an override of close(), and that Solr arranged to call called at core shutdown. 

What would it do? The factories that are referenced by TokenizerChain have no close protocol at all. 

As Rob points out, the individual _Tokenizers_ that the factories produce do have a close() protocol that causes other problems. But my real issue, sadly obscured by my sloppy original writing job, is not with tokenizers, it's with TokenizerFactory and TokenFilterFactory-ies.

Independently, when people are using our Lucene classes from Lucene-and-not Solr, the problem in LUCENE-2145 makes it hard to clean up properly. However, for performance reasons, I want to hold the resources up in the factories, not down in the Tokenizers.



                
> Allow schema analysis object factories to be cleaned up properly when the core shuts down
> -----------------------------------------------------------------------------------------
>
>                 Key: SOLR-4872
>                 URL: https://issues.apache.org/jira/browse/SOLR-4872
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 4.3
>            Reporter: Benson Margulies
>
> I have a need, in an TokenizerFactory or TokenFilterFactory, to have a shared cache that is cleaned up when the core is torn down. Solr rejects analysis components that are SolrCoreAware. Is there some really good reason for this? What harm would come from allowing one to register a CloseHook?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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