[
https://issues.apache.org/jira/browse/SOLR-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681819#comment-13681819
]
Hoss Man commented on SOLR-4872:
--------------------------------
bq. No, I think this is actually the core issue. Tokenizer.close() doesnt
mean... close the Tokenizer. it means close the reader. This is super-confusing
and it means Benson has no way to release resources.
You're assuming that the resources in question are tied to a concrete Tokenizer
*instance* -- but if you use TokenizerFactories (which 99.999% of solr users
do) then you're going to get a shiny new Tokenizer instance for every Reader --
hence my point that it seems like you really want the *factory* to be caching
the data, and then cleaning it up when the *factory* is closed.
There may also be changes desired to the semantics of Tokenizer.close, but that
seems like a much bigger, and largely independent issue: even if that happens,
we still need to get Solr closing analyzers and having TokenizerChain call
close on any Analysis Factories it has in it.
> 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: [email protected]
For additional commands, e-mail: [email protected]