Testing Solr Locally
Sometimes saving a new schema.xml can result in an error that prevents your index from being correctly configured.
When saving a new schema.xml, we do perform some very basic validation of the XML, in order to verify that it is well-formed, and that certain assumptions that our systems make are in place. However, as of this writing, we cannot perform any further validation of the correctness of the schema.xml until it is loaded into Solr.
For those that reason, we highly encourage that you use a development instance of Solr loaded with a subset of your production data to test your search locally before deploying changes to production. This will give you the quickest feedback and the most detailed access to all the logs you need while developing your application’s schema.xml.
Some Solr clients come bundled with an instance of Solr for this reason. Sunspot for Ruby on Rails is one such example.
You can also install Solr via homebrew on OS X with
brew install solr
Finally, you can follow the official Solr tutorial at http://lucene.apache.org/solr/tutorial which will ultimately guide you through starting a Solr server and using it for a few sample use cases.
If it’s impractical for you to set up a local instance of Solr, Websolr does allow you to create free indices for experimenting. You can always create a spare index to test changes and just destroy it if anything goes too wrong.
When you find yourself at a loss and need help digging into the production server logs, definitely get in touch and let us know. We’re more than happy to dig up whatever information you need from the logs to help you get things sorted out.