org.apache.solr.schema
Class ManagedIndexSchemaFactory

java.lang.Object
  extended by org.apache.solr.schema.IndexSchemaFactory
      extended by org.apache.solr.schema.ManagedIndexSchemaFactory
All Implemented Interfaces:
NamedListInitializedPlugin

public class ManagedIndexSchemaFactory
extends IndexSchemaFactory


Constructor Summary
ManagedIndexSchemaFactory()
           
 
Method Summary
 IndexSchema create(String resourceName, SolrConfig config)
          First, try to locate the managed schema file named in the managedSchemaResourceName param.
 void init(NamedList args)
           
 
Methods inherited from class org.apache.solr.schema.IndexSchemaFactory
buildIndexSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedIndexSchemaFactory

public ManagedIndexSchemaFactory()
Method Detail

init

public void init(NamedList args)

create

public IndexSchema create(String resourceName,
                          SolrConfig config)
First, try to locate the managed schema file named in the managedSchemaResourceName param. If the managed schema file exists and is accessible, it is used to instantiate an IndexSchema. If the managed schema file can't be found, the resource named by the resourceName parameter is used to instantiate an IndexSchema. Once the IndexSchema is instantiated, if the managed schema file does not exist, the instantiated IndexSchema is persisted to the managed schema file named in the managedSchemaResourceName param, in the directory given by SolrResourceLoader.getConfigDir(), or if configs are in ZooKeeper, under ZkSolrResourceLoader.collectionZkPath. After the managed schema file is persisted, the original schema file is renamed by appending the extension named in UPGRADED_SCHEMA_EXTENSION.

Specified by:
create in class IndexSchemaFactory


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.