I was writing some unit tests to setup a traditional Master/Slave environment 
as well as a new SolrCloud based environment.  In playing around with code 
based on TestMultiCoreConfBootstrap, I learned about the "bootstrap_conf" 
system property which bootstraps your current configuration into ZK, and is a 
boolean, versus "bootstrap_confdir" which is a string passing the name of the 
directory.

Are they both needed?  Seems like either both should always be there, or just 
bootstrap_confdir.  It seemed just a bit confusing, and very magical.

Also, if you just use "bootstrap_conf", then the "collection.configName" 
parameter is ignored, you always just get "collection1".   This is without a 
predefined set of cores in solr.xml, which may make sense...?

          @Test
          public void testMultiCoreConfBootstrap() throws Exception {
//          System.setProperty("bootstrap_conf", "true");
                System.setProperty("bootstrap_confdir",getSolrHome() + "/conf");
            System.setProperty("collection.configName","leads");
            cores = new CoreContainer(home, new File(home, "solr.xml"));
            SolrZkClient zkclient = cores.getZkController().getZkClient();
            // zkclient.printLayoutToStdOut();
            
            assertTrue(zkclient.exists("/configs/leads/solrconfig.xml", true));
            assertTrue(zkclient.exists("/configs/leads/schema.xml", true));
//          assertTrue(zkclient.exists("/configs/core0/solrconfig.xml", true));
//          assertTrue(zkclient.exists("/configs/core1/schema.xml", true));
          }

Eric

-----------------------------------------------------
Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com
Co-Author: Apache Solr 3 Enterprise Search Server available from 
http://www.packtpub.com/apache-solr-3-enterprise-search-server/book    
This e-mail and all contents, including attachments, is considered to be 
Company Confidential unless explicitly stated otherwise, regardless of whether 
attachments are marked as such.












---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to