Search in sources :

Example 1 with NamedListInitializedPlugin

use of org.apache.solr.util.plugin.NamedListInitializedPlugin in project lucene-solr by apache.

the class SolrCore method initDeletionPolicy.

private IndexDeletionPolicyWrapper initDeletionPolicy(IndexDeletionPolicyWrapper delPolicyWrapper) {
    if (delPolicyWrapper != null) {
        return delPolicyWrapper;
    }
    final PluginInfo info = solrConfig.getPluginInfo(IndexDeletionPolicy.class.getName());
    final IndexDeletionPolicy delPolicy;
    if (info != null) {
        delPolicy = createInstance(info.className, IndexDeletionPolicy.class, "Deletion Policy for SOLR", this, getResourceLoader());
        if (delPolicy instanceof NamedListInitializedPlugin) {
            ((NamedListInitializedPlugin) delPolicy).init(info.initArgs);
        }
    } else {
        delPolicy = new SolrDeletionPolicy();
    }
    return new IndexDeletionPolicyWrapper(delPolicy, snapshotMgr);
}
Also used : IndexDeletionPolicy(org.apache.lucene.index.IndexDeletionPolicy) NamedListInitializedPlugin(org.apache.solr.util.plugin.NamedListInitializedPlugin)

Aggregations

IndexDeletionPolicy (org.apache.lucene.index.IndexDeletionPolicy)1 NamedListInitializedPlugin (org.apache.solr.util.plugin.NamedListInitializedPlugin)1