Erick Erickson <erickerick...@gmail.com> schrieb am Fr., 29. Jan. 2016 um
17:55 Uhr:

> These are system properties, right? They go in the startup for all of
> your Solr instances scattered about your cluster.
>

No, they will be used in the solrconfig.xml and schema.xml. I just
mentioned the -Dmyproperty=... example because that's one way to get
properties in there.

What I'm looking for is one concise place to define properties that all
cores using this configset will use as a default. I've tried several ways:

* Using the ${property:default} syntax in the configs is no good, because
the same property will occur several times in the configs
* Setting them with the config API is no good, because then they live in my
code, but I'd rather have them in a property file for visiblity and
maintenance reasons
* Setting them as system properties (-Dmyproperty=...) is no good, because
that makes our deployment more complicated

So, ideally I can just put a .properties file in the configset that will
provide default values for all cores using this configset.

Of course the properties may be changed from their default values on a
per-core base, but that's what the config API is for.

So, where do other people put their properties when they use configsets?

Best regards,
Georg


>
> The bin/solr script has a -a option for passing additional stuff to the
> JVM...
>
> Best,
> Erick
>
> On Thu, Jan 28, 2016 at 11:50 PM, Georg Sorst <g.so...@findologic.com>
> wrote:
> > Any takers?
> >
> > Georg Sorst <g.so...@findologic.com> schrieb am So., 24. Jän. 2016
> 00:22:
> >
> >> Hi list!
> >>
> >> I've just started playing with Solr 5 (upgrading from Solr 4) and want
> to
> >> use configsets. I'm currently struggling with how to use user-defined
> >> properties and configsets together.
> >>
> >> My solrconfig.xml contains a few properties. Previously these were in a
> >> solrcore.properties and thus were properly loaded and substituted by
> Solr.
> >>
> >> Now I've moved my configuration to a configset (as I may need to create
> >> several cores with the same config). When I create a core with
> >>
> http://localhost:8983/solr/admin/cores?action=CREATE&name=mycore&configSet=myconfigset
> Solr
> >> tells me:
> >>
> >> Caused by: org.apache.solr.common.SolrException: Error loading solr
> config
> >> from /<solr home>/configsets/myconfigset/conf/solrconfig.xml
> >> at
> >>
> org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:186)
> >> at
> >>
> org.apache.solr.core.ConfigSetService.createSolrConfig(ConfigSetService.java:94)
> >> at
> >>
> org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:74)
> >> ... 30 more
> >> Caused by: org.apache.solr.common.SolrException: No system property or
> >> default value specified for <myproperty> value:
> >>     <the line from solrconfig.xml containing the property>
> >> at
> >>
> org.apache.solr.util.PropertiesUtil.substituteProperty(PropertiesUtil.java:66)
> >> ...
> >>
> >> Where should I put my properties so Solr can load them when I create a
> new
> >> core using this config set? From what I read I could specify them as
> system
> >> properties (-Dmyproperty=...) but I'd rather keep them in a file that I
> can
> >> check in.
> >>
> >> Thanks!
> >> Georg
> >>
> >>
> >>
>

Reply via email to