public class ManagedIndexSchemaFactory extends IndexSchemaFactory implements SolrCoreAware
IndexSchemaFactory.VersionedConfig
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MANAGED_SCHEMA_RESOURCE_NAME |
static String |
MANAGED_SCHEMA_RESOURCE_NAME |
static String |
UPGRADED_SCHEMA_EXTENSION |
Constructor and Description |
---|
ManagedIndexSchemaFactory() |
Modifier and Type | Method and Description |
---|---|
ManagedIndexSchema |
create(String resourceName,
SolrConfig config,
ConfigSetService configSetService)
First, try to locate the managed schema file named in the managedSchemaResourceName
param.
|
SolrConfig |
getConfig() |
String |
getManagedSchemaResourceName() |
SolrResourceLoader |
getResourceLoader() |
ManagedIndexSchema |
getSchema() |
String |
getSchemaResourceName(String cdResourceName)
Returns the resource (file) name that will be used for the schema itself.
|
Object |
getSchemaUpdateLock() |
void |
inform(SolrCore core) |
void |
init(NamedList args) |
boolean |
isMutable() |
void |
setSchema(ManagedIndexSchema schema) |
buildIndexSchema, buildIndexSchema, getConfigResource, newIndexSchemaFactory
public static final String UPGRADED_SCHEMA_EXTENSION
public static final String DEFAULT_MANAGED_SCHEMA_RESOURCE_NAME
public static final String MANAGED_SCHEMA_RESOURCE_NAME
public String getManagedSchemaResourceName()
public SolrResourceLoader getResourceLoader()
public void init(NamedList args)
init
in interface NamedListInitializedPlugin
public String getSchemaResourceName(String cdResourceName)
IndexSchemaFactory
IndexSchemaFactory.create(String, SolrConfig, ConfigSetService)
.
The input is the name coming from the CoreDescriptor
which acts as a default or asked-for name.getSchemaResourceName
in class IndexSchemaFactory
public ManagedIndexSchema create(String resourceName, SolrConfig config, ConfigSetService configSetService)
SolrResourceLoader.getConfigDir()
, or if configs are
in ZooKeeper, under ZkSolrResourceLoader.getConfigSetZkPath()
.
After the managed schema file is persisted, the original schema file is
renamed by appending the extension named in UPGRADED_SCHEMA_EXTENSION
.create
in class IndexSchemaFactory
public Object getSchemaUpdateLock()
public void inform(SolrCore core)
inform
in interface SolrCoreAware
public ManagedIndexSchema getSchema()
public void setSchema(ManagedIndexSchema schema)
public boolean isMutable()
public SolrConfig getConfig()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.