Yup, unless there is some bug (I'm not seeing one visually looking at the code), that should work:
zkHost = cfg.get("solr/@zkHost", null); - Mark On Feb 26, 2013, at 8:26 PM, varun srivastava <varunmail...@gmail.com> wrote: > Hi Mark, > specifying zkHost in solr.xml is not working. It seems only system > property -DzkHost works. Can you confirm the param name is zkHost in > solr.xml ? > > Thanks > Varun > > On Tue, Feb 26, 2013 at 4:24 PM, Mark Miller <markrmil...@gmail.com> wrote: > >> >> On Feb 26, 2013, at 7:15 PM, varun srivastava <varunmail...@gmail.com> >> wrote: >> >>> I dont like setting parameters as system properties, >> >> They are nice for the example, and often if you are using shell scripts or >> something to manage your cluster when you are screwing around, but yeah, >> many people will be happy to just put the info in the xml file. >> >>> but I am happy if i >>> can setup these fields inside solr.xml . So you mean following config >> will >>> work >>> >>> <cores adminPath="/admin/cores" defaultCoreName="core0" >>> zkClientTimeout="20000" hostPort="<tomcat port>" hostContext="solr" >>> zkHost="<zookeeper hosts>" > >> >> Yes. >> >> The only sys prop you would have to set is numShards, unless you removed >> the default collection and used the CoreAdmin or Collections API to create >> the first collection. >> >> - Mark >> >>