I write to seek guidance from the dev community on SOLR-4872.

This JIRA concerns lifecycle management for Solr schema components:
tokenizers, token filters, and char filters.

If you read the comments, you'll find three opinions from committers. What
follows are précis: read the JIRA to get the details.

Hoss is in favor of having close methods on these components and arranging
to have them called when a schema is torn down. Hoss is opposed to allowing
these objects to be SolrCoreAware.

Yonik is opposed to having such close methods and prefers SolrCoreAware, or
something like it, or letting component implementors use finalizers.

Rob Muir thinks that there should be a fix to the related LUCENE-2145,
which I see as complementary to this.

So, here I am. I'm not a committer. I'm a builder of Solr plugins, and,
from that standpoint, I think that there should be a lifecycle somehow,
because I try to apply a general principle of avoiding finalizers, and
because in some cases their unpredictable schedule can be a practical
problem.

Is there a committer in this community who is willing to work with me on
this? As things are, I can't see how to proceed, since I'm suspended
between two committers with apparently opposed views.

I have already implemented what I think of as the hard part, and, indeed,
the foundation of either approach. I have a close lifecycle that extends
down to the IndexSchema object and the TokenizerChain. So it remains to
decide whether that should in turn call ordinary close methods on the
tokenizers, token filters, and char filters, or rather look for some
optional lifecycle interface.

Reply via email to