Ok, if there is no objection, I'll file a bug and create a patch for it. Thanks,
Jianhan On Tue, May 5, 2009 at 3:18 PM, Jian Han Guo <[email protected]> wrote: > > Hi, > > I wanted to use this parameter to specify different solr configuration > files for master and slave to simplify deployment procedure. Unfortunately, > I can't dynamically replace the value of this parameter. Basically, what I > want is > > <filter> > <filter-name>SolrRequestFilter</filter-name> > <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class> > <init-param> > <param-name>solrconfig-filename</param-name> > <param-value>solrconfig-master.xml</param-value> > </init-param> > </filter> > > for master instance, and > > <filter> > <filter-name>SolrRequestFilter</filter-name> > <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class> > <init-param> > <param-name>solrconfig-filename</param-name> > <param-value>solrconfig-slave.xml</param-value> > </init-param> > </filter> > > for slave instance. > > Ideally, if I can use system property for its value like in solrconfig.xml. > For example, > > > <filter> > <filter-name>SolrRequestFilter</filter-name> > <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class> > <init-param> > <param-name>solrconfig-filename</param-name> > <param-value>${solr.config.filename: solrconfig.xml}</param-value> > </init-param> > </filter> > > but I learned that in general we can't use system property in web.xml. > > I realize that I can use replication of config file to achieve this, but I > thought that creates unnecessary dependencies for slaves on master instance. > > So here is my proposal: > > make SolrDispatchFilter look up another init parameter, say > 'solrconfig-filename-property', and its value is a system property name, and > if this property is set, we got the file name, otherwise nothing happens (of > course, if both exist, 'solrconfig-filename' takes precedence). This will > give us maxium flexibility of specifying configuration files for different > instances. > > Your thoughts? > > Thanks, > > Jianhan > > >
