hephestos
hephestos

Reputation: 434

Solr schema validation

I don't understand in Solr wiki, whether Solr takes one schema.xml, or can have multiple ones.

I took the schema from Nutch and placed it in Solr, and later tried to run examples from Solr. The message was clear that there was error in schema.

If I have a Solr, am I stuck to a specific schema? If not, where is the information for using multiple ones?

Upvotes: 1

Views: 1564

Answers (1)

Paige Cook
Paige Cook

Reputation: 22555

From the Solr Wiki - SchemaXml page:

The schema.xml file contains all of the details about which fields your documents can contain, and how those fields should be dealt with when adding documents to the index, or when querying those fields.

Now you can only have one schema.xml file per instance/index within Solr. You can implement multiple instances/indexes within Solr by using the following strategies:

  1. Running Multiple Indexes - please see this Solr Wiki page for more details.

    There are various strategies to take when you want to manage multiple "indexes" in a Single Servlet Container

  2. Running Multiple Cores within a Solr instance. - Again, see the Solr Wiki page for more details...

    Multiple cores let you have a single Solr instance with separate configurations and indexes, with their own config and schema for very different applications, but still have the convenience of unified administration. Individual indexes are still fairly isolated, but you can manage them as a single application, create new indexes on the fly by spinning up new SolrCores, and even make one SolrCore replace another SolrCore without ever restarting your Servlet Container.

Upvotes: 3

Related Questions