You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Mark Miller <ma...@gmail.com> on 2015/09/04 19:21:25 UTC

Can no longer override IndexConfig values in solrconfig.xml?

On trunk, when I add the following to the solrconfig.xml, I can't load a
SolrCore. What am I doing wrong?

<indexConfig>
    <lockType>${solr.lock.type:native}</lockType>
</indexConfig>

Caused by: org.apache.solr.common.SolrException: solrconfig.xml contains
more than one value for config path: indexConfig
at org.apache.solr.core.Config.getNode(Config.java:275)
at org.apache.solr.core.Config.getNode(Config.java:252)
at org.apache.solr.update.SolrIndexConfig.<init>(SolrIndexConfig.java:114)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:229)
at
org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:176)
... 10 more

There is only the indexConfig I have added.

- Mark
-- 
- Mark
about.me/markrmiller

Re: Can no longer override IndexConfig values in solrconfig.xml?

Posted by Mark Miller <ma...@gmail.com>.
I see - we have XML includes now. This in another file.

- Mark

On Fri, Sep 4, 2015 at 1:21 PM Mark Miller <ma...@gmail.com> wrote:

> On trunk, when I add the following to the solrconfig.xml, I can't load a
> SolrCore. What am I doing wrong?
>
> <indexConfig>
>     <lockType>${solr.lock.type:native}</lockType>
> </indexConfig>
>
> Caused by: org.apache.solr.common.SolrException: solrconfig.xml contains
> more than one value for config path: indexConfig
> at org.apache.solr.core.Config.getNode(Config.java:275)
> at org.apache.solr.core.Config.getNode(Config.java:252)
> at org.apache.solr.update.SolrIndexConfig.<init>(SolrIndexConfig.java:114)
> at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:229)
> at
> org.apache.solr.core.SolrConfig.readFromResourceLoader(SolrConfig.java:176)
> ... 10 more
>
> There is only the indexConfig I have added.
>
> - Mark
> --
> - Mark
> about.me/markrmiller
>
-- 
- Mark
about.me/markrmiller

Re: Can no longer override IndexConfig values in solrconfig.xml?

Posted by Mark Miller <ma...@gmail.com>.
Really, I was already pretty sure that there was nothing else specifying
the lock factory because I saw that the lock factory was not being set
right, even though HdfsTestUtil was setting it as: solr.lock.type=hdfs

That xml snippet now seems to have solr.tests.lockType instead of
solr.lock.type though. So that was the problem. I will add a check to an
hdfs test to make sure the right lock factory gets set via config.

I'm sure I've been by the includes before, but same as this time, I ignored
what I didn't recognize - XML has a bunch of junk I'm used to glazing over.

- Mark

On Fri, Sep 4, 2015 at 1:49 PM Mark Miller <ma...@gmail.com> wrote:

> Not messing with anything in indexconfig I guess.
>
> - Mark
>
> On Fri, Sep 4, 2015 at 1:37 PM Chris Hostetter <ho...@fucit.org>
> wrote:
>
>>
>> : I was not up to date on this:
>> :
>> : <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="
>> : http://www.w3.org/2001/XInclude"/>
>> :
>> : First XML include I've ever seen in practice.
>>
>> dude... that's been in all solr (core) tests since summer 2013.
>>
>> where you been?
>>
>>
>>
>>
>> -Hoss
>> http://www.lucidworks.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>> --
> - Mark
> about.me/markrmiller
>
-- 
- Mark
about.me/markrmiller

Re: Can no longer override IndexConfig values in solrconfig.xml?

Posted by Mark Miller <ma...@gmail.com>.
Not messing with anything in indexconfig I guess.

- Mark

On Fri, Sep 4, 2015 at 1:37 PM Chris Hostetter <ho...@fucit.org>
wrote:

>
> : I was not up to date on this:
> :
> : <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="
> : http://www.w3.org/2001/XInclude"/>
> :
> : First XML include I've ever seen in practice.
>
> dude... that's been in all solr (core) tests since summer 2013.
>
> where you been?
>
>
>
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
> --
- Mark
about.me/markrmiller

Re: Can no longer override IndexConfig values in solrconfig.xml?

Posted by Chris Hostetter <ho...@fucit.org>.
: I was not up to date on this:
: 
: <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="
: http://www.w3.org/2001/XInclude"/>
: 
: First XML include I've ever seen in practice.

dude... that's been in all solr (core) tests since summer 2013.  

where you been?




-Hoss
http://www.lucidworks.com/

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


Re: Can no longer override IndexConfig values in solrconfig.xml?

Posted by Mark Miller <ma...@gmail.com>.
I was not up to date on this:

<xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="
http://www.w3.org/2001/XInclude"/>

First XML include I've ever seen in practice.

- Mark

On Fri, Sep 4, 2015 at 1:32 PM Chris Hostetter <ho...@fucit.org>
wrote:

> : On trunk, when I add the following to the solrconfig.xml, I can't load a
> : SolrCore. What am I doing wrong?
>         ...
> : There is only the indexConfig I have added.
>
> are you sure?
>
> file a bug and attach your entire solr home dir, because i can't reproduce
> with the following configs -- the core loads just fine...
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <config>
>   <luceneMatchVersion>6.0.0</luceneMatchVersion>
>   <indexConfig>
>     <lockType>${solr.lock.type:native}</lockType>
>   </indexConfig>
> </config>
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <schema name="example" version="1.5">
>    <field name="_version_" type="long" indexed="true" stored="true"/>
>    <field name="_root_" type="string" indexed="true" stored="false"/>
>    <field name="id" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>    <uniqueKey>id</uniqueKey>
>    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
>    <fieldType name="long" class="solr.TrieLongField" precisionStep="0"
> positionIncrementGap="0"/>
> </schema>
>
>
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
> --
- Mark
about.me/markrmiller

Re: Can no longer override IndexConfig values in solrconfig.xml?

Posted by Chris Hostetter <ho...@fucit.org>.
: On trunk, when I add the following to the solrconfig.xml, I can't load a
: SolrCore. What am I doing wrong?
	... 
: There is only the indexConfig I have added.

are you sure?

file a bug and attach your entire solr home dir, because i can't reproduce 
with the following configs -- the core loads just fine...


<?xml version="1.0" encoding="UTF-8" ?>
<config>
  <luceneMatchVersion>6.0.0</luceneMatchVersion>
  <indexConfig>
    <lockType>${solr.lock.type:native}</lockType>
  </indexConfig>
</config>

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="example" version="1.5">
   <field name="_version_" type="long" indexed="true" stored="true"/>
   <field name="_root_" type="string" indexed="true" stored="false"/>
   <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> 
   <uniqueKey>id</uniqueKey>
   <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
   <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
</schema>



-Hoss
http://www.lucidworks.com/

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