Package org.apache.solr.schema
Class IndexSchemaFactory
- java.lang.Object
-
- org.apache.solr.schema.IndexSchemaFactory
-
- All Implemented Interfaces:
NamedListInitializedPlugin
- Direct Known Subclasses:
ClassicIndexSchemaFactory
,ManagedIndexSchemaFactory
public abstract class IndexSchemaFactory extends Object implements NamedListInitializedPlugin
Base class for factories for IndexSchema implementations
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndexSchemaFactory.VersionedConfig
-
Constructor Summary
Constructors Constructor Description IndexSchemaFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IndexSchema
buildIndexSchema(String resourceName, SolrConfig config)
static IndexSchema
buildIndexSchema(String resourceName, SolrConfig config, ConfigSetService configSetService)
Instantiates the configured schema factory, then calls create on it.IndexSchema
create(String resourceName, SolrConfig config, ConfigSetService configSetService)
Returns an index schema created from a local resource.static ConfigSetService.ConfigResource
getConfigResource(ConfigSetService configSetService, InputStream schemaInputStream, SolrResourceLoader loader, String name)
static ConfigNode
getParsedSchema(InputStream is, SolrResourceLoader loader, String name)
String
getSchemaResourceName(String cdResourceName)
Returns the resource (file) name that will be used for the schema itself.static IndexSchemaFactory
newIndexSchemaFactory(SolrConfig config)
Instantiates us fromSolrConfig
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.util.plugin.NamedListInitializedPlugin
init
-
-
-
-
Method Detail
-
buildIndexSchema
public static IndexSchema buildIndexSchema(String resourceName, SolrConfig config)
-
buildIndexSchema
public static IndexSchema buildIndexSchema(String resourceName, SolrConfig config, ConfigSetService configSetService)
Instantiates the configured schema factory, then calls create on it.
-
newIndexSchemaFactory
public static IndexSchemaFactory newIndexSchemaFactory(SolrConfig config)
Instantiates us fromSolrConfig
.
-
getSchemaResourceName
public String getSchemaResourceName(String cdResourceName)
Returns the resource (file) name that will be used for the schema itself. The answer may be a guess. Do not pass the result of this tocreate(String, SolrConfig, ConfigSetService)
. The input is the name coming from theCoreDescriptor
which acts as a default or asked-for name.
-
create
public IndexSchema create(String resourceName, SolrConfig config, ConfigSetService configSetService)
Returns an index schema created from a local resource. The input is usually from the core descriptor.
-
getConfigResource
public static ConfigSetService.ConfigResource getConfigResource(ConfigSetService configSetService, InputStream schemaInputStream, SolrResourceLoader loader, String name) throws IOException
- Throws:
IOException
-
getParsedSchema
public static ConfigNode getParsedSchema(InputStream is, SolrResourceLoader loader, String name) throws IOException, SAXException, ParserConfigurationException
-
-