I'm writing a client using SolrJ and was wondering how to handle a multi core installation. We want to use the facility to rebuild the index on one of the cores at a scheduled time and then use the SWAP facility to switch the "live" core to the newly rebuilt core. I think I can do the SWAP with CoreAdminRequest.setAction() with a suitable parameter.
First of all, does Solr have some concept of a default core? If I have core0 as my "live" core and core1 which I rebuild, then after the swap I expect core0 to now contain my rebuilt index and core1 to contain the old live core data. My application should then need to keep referring to core0 as normal with no change. Does I have to refer to core0 programmatically? I've currently got working client code to index and to query my Solr data but I was wondering whether or how I set the core when I move to multi core? There's examples showing it set as part of the URL so my guess it's done by using something like setParam on SolrQuery. Has anyone got any advice or examples of using SolrJ in a multi core installation? Regards Shaun