I'm building a test suite for a python site, powered by hudson. Currently, the workflow for a test run looks like:
This pattern is similar to how Django handles tests.
I'd like to replicate this pattern for solr; I have a test copy of the schema.xml file in my repository and want to prop up a new solr instance with an empty index at the start of each test and nuke it when done. The schema.xml file could change (much like the mysql schema), which is why it needs to be rebuilt from scratch each time (in addition to good testing hygiene).
I'm finding the solr documentation to be fairly limited in this regard. I'm fine with running solr under jetty, which should simplify matters, but I'm at a loss for how to dynamically create a new solr instance or at least a fresh core on every deployment.
Use the Solr Admin API to create a new core.