org.apache.solr.schema
Class IndexSchemaFactory

java.lang.Object
  extended by 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


Constructor Summary
IndexSchemaFactory()
           
 
Method Summary
static IndexSchema buildIndexSchema(String resourceName, SolrConfig config)
          Instantiates the configured schema factory, then calls create on it.
 IndexSchema create(String resourceName, SolrConfig config)
          Returns an index schema created from a local resource
static String getResourceNameToBeUsed(String resourceName, SolrConfig config)
          Returns the resource name that will be used: if the schema is managed, the resource name will be drawn from the schema factory configuration in the given SolrConfig.
 
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
 

Constructor Detail

IndexSchemaFactory

public IndexSchemaFactory()
Method Detail

create

public IndexSchema create(String resourceName,
                          SolrConfig config)
Returns an index schema created from a local resource


buildIndexSchema

public static IndexSchema buildIndexSchema(String resourceName,
                                           SolrConfig config)
Instantiates the configured schema factory, then calls create on it.


getResourceNameToBeUsed

public static String getResourceNameToBeUsed(String resourceName,
                                             SolrConfig config)
Returns the resource name that will be used: if the schema is managed, the resource name will be drawn from the schema factory configuration in the given SolrConfig. Otherwise, the given resourceName will be returned.

Parameters:
resourceName - The name to use if the schema is not managed
config - The SolrConfig from which to get the schema factory config
Returns:
If the schema is managed, the resource name from the given SolrConfig, otherwise the given resourceName.


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