Altering the index structure on a live collection

The ability to push a new index structure definition (the schema.xml file) to ZooKeeper is nice, but it requires the collection to be reloaded. The same goes for Solr, when it works in noncloud mode, we need to reload a core for Solr to see the changes. This is also not super convenient when you would like to change the index structure from outside Solr. That is why with the release of Solr 4.3, the Schema API allows you to alter the index structure using simple HTTP-based requests. In this recipe, we will take a look at how to use the Schema API to alter our index structure.

Getting ready

Before continuing with the recipe, read the Retrieving information about the index structure recipe discussed ...

Get Solr Cookbook - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.