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 Modifier and Type Class Description static classIndexSchemaFactory.VersionedConfig
-
Field Summary
Fields Modifier and Type Field Description static Consumer<String>CACHE_MISS_LISTENER
-
Constructor Summary
Constructors Constructor Description IndexSchemaFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IndexSchemabuildIndexSchema(String resourceName, SolrConfig config)static IndexSchemabuildIndexSchema(String resourceName, SolrConfig config, ConfigSetService configSetService)Instantiates the configured schema factory, then calls create on it.IndexSchemacreate(String resourceName, SolrConfig config, ConfigSetService configSetService)Returns an index schema created from a local resource.static ConfigSetService.ConfigResourcegetConfigResource(ConfigSetService configSetService, InputStream schemaInputStream, SolrResourceLoader loader, String name)static IndexSchemaFactory.VersionedConfiggetFromCache(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)StringgetSchemaResourceName(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, 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 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
-
-