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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexSchemaFactory()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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-2016 Apache Software Foundation. All Rights Reserved.