You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Erick Erickson (JIRA)" <ji...@apache.org> on 2013/11/13 01:13:17 UTC

[jira] [Resolved] (SOLR-5247) Support for custom per core properties missing with new-style solr.xml

     [ https://issues.apache.org/jira/browse/SOLR-5247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erick Erickson resolved SOLR-5247.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.5
                   5.0

[~n0v1] I just tried this and it seems to work fine for core creation on 4.5 and 4x. I know there has been quite a bit of work in this area _right_ after the 4.4 Solr was cut so I'm going to say it's fixed.

If anyone finds out differently, we can re-open this JIRA or open a new one.

> Support for custom per core properties missing with new-style solr.xml
> ----------------------------------------------------------------------
>
>                 Key: SOLR-5247
>                 URL: https://issues.apache.org/jira/browse/SOLR-5247
>             Project: Solr
>          Issue Type: Bug
>          Components: multicore
>    Affects Versions: 4.4
>            Reporter: Chris F
>            Assignee: Erick Erickson
>            Priority: Trivial
>              Labels: 4.4, core.properties, discovery, new-style, property, solr.xml
>             Fix For: 5.0, 4.5
>
>
> This part has been solved. See comments
> When using old-style solr.xml I can define custom properties per core like so:
> {code:xml}
> <cores adminPath="/admin/cores" defaultCoreName="core1">
>   <core name="core1" instanceDir="core1" config="solrconfig.xml" schema="schema.xml">
>     <property name="foo" value="bar" />
>   </core>
> </cores>
> {code}
> I can then use the property "foo" in schema.xml or solrconfig.xml like this:
> {code:xml}
> <str name="foo">${foo}</str>
> {code}
> After switching to the new-style solr.xml with separate core.properties files per core this does not work anymore.
> I guess the corresponding core.properties file should look like this:
> {code}
> config=solrconfig.xml
> name=core1
> schema=schema.xml
> foo=bar
> {code}
> (I also tried property.foo=bar)
> With that, I get the following error when reloading the core:
> {code}
> org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: No system property or default value specified for foo value:${foo}
> {code}
> I can successfully reload the core if I use $\{foo:undefined\} but the value of "foo" will always be "undefined" then.
> When trying to create a new core with an url like this:
> {code}
> http://localhost:8080/solr/admin/cores?action=CREATE&name=core2&instanceDir=core2&config=solrconfig.xml&schema=schema.xml&property.foo=bar&persist=true
> {code}
> the property "foo" will not appear in core.properties. However, I can use it in schema.xml. But only until restarting the servlet container. After that, the property is lost.
> Possibly related to [SOLR-5208|https://issues.apache.org/jira/browse/SOLR-5208]?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org