Package org.apache.solr.schema
Class IndexSchemaFactory
java.lang.Object
org.apache.solr.schema.IndexSchemaFactory
- All Implemented Interfaces:
NamedListInitializedPlugin
- Direct Known Subclasses:
ClassicIndexSchemaFactory,ManagedIndexSchemaFactory
@NotThreadSafe
public abstract class IndexSchemaFactory
extends Object
implements NamedListInitializedPlugin
Base class for factories for IndexSchema implementations
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexSchemabuildIndexSchema(String resourceName, SolrConfig config) static IndexSchemabuildIndexSchema(String resourceName, SolrConfig config, ConfigSetService configSetService) Instantiates the configured schema factory, then calls create on it.create(String resourceName, SolrConfig config, ConfigSetService configSetService) Returns an index schema created from a local resource.getConfigResource(ConfigSetService configSetService, InputStream schemaInputStream, SolrResourceLoader loader, String name) getFromCache(String name, SolrResourceLoader loader, Supplier<org.apache.solr.common.util.ObjectCache> objectCacheSupplier, Supplier<IndexSchemaFactory.VersionedConfig> c) static org.apache.solr.common.ConfigNodegetParsedSchema(InputStream is, SolrResourceLoader loader, String name) getSchemaResourceName(String cdResourceName) Returns the resource (file) name that will be used for the schema itself.static IndexSchemaFactorynewIndexSchemaFactory(SolrConfig config) Instantiates us fromSolrConfig.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.util.plugin.NamedListInitializedPlugin
init
-
Field Details
-
CACHE_MISS_LISTENER
-
-
Constructor Details
-
IndexSchemaFactory
public IndexSchemaFactory()
-
-
Method Details
-
buildIndexSchema
-
buildIndexSchema
public static IndexSchema buildIndexSchema(String resourceName, SolrConfig config, ConfigSetService configSetService) Instantiates the configured schema factory, then calls create on it. -
newIndexSchemaFactory
Instantiates us fromSolrConfig. -
getSchemaResourceName
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 theCoreDescriptorwhich 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) -
getFromCache
public static IndexSchemaFactory.VersionedConfig getFromCache(String name, SolrResourceLoader loader, Supplier<org.apache.solr.common.util.ObjectCache> objectCacheSupplier, Supplier<IndexSchemaFactory.VersionedConfig> c) -
getParsedSchema
public static org.apache.solr.common.ConfigNode getParsedSchema(InputStream is, SolrResourceLoader loader, String name) throws IOException, SAXException, ParserConfigurationException
-