(10/05/06 4:31), Turner, Robbin J wrote:
I followed through some of the previous post, there seems to be a general
problem with trying to us XInclude in the solr schema.xml. I use several
variation to include my fieldType declarations. I keep getting an error file
not found. I put the file first in the SOLRHOME, then in CATALINA_HOME/conf,
then in just CATALINA_HOME. All produced the same error. If someone has an
schema.xml example and placement (what path) that work I would greatly
appreciate it.
Solrhome = /opt/solr
Catalina_home = /opt/tomcat
A copy of the actual schema_type.xml was placed in /opt/solr/conf,
/opt/tomcat/conf and /opt/tomcat
For each of the following xincludes, file not found was reported in the
catalina.out:
Try #1
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include href="/opt/solr/conf/schema_type.xml"
/>
</types>
<fields>
<field>....
...
</fields>
</schema>
Try #2
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include href="${solr.core.instanceDir}/conf
/schema_type.xml" />
</types>
<fields>
<field>....
...
</fields>
</schema>
Try #3
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include href="${catalina.home}
/conf/schema_type.xml" />
</types>
<fields>
<field>....
...
</fields>
</schema>
Try #4
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include href="schema_type.xml" />
</types>
<fields>
<field>....
...
</fields>
</schema>
Try #4
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include href="schema_type.xml" />
</types>
<fields>
<field>....
...
</fields>
</schema>
Try #5
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include href="/opt/tomcat/schema_type.xml"
/>
</types>
<fields>
<field>....
...
</fields>
</schema>
Try #6
<?xml version="1.0" encoding="UTF-8"?>
<schema name="core1" version="1.2">
<types>
<xi:include
href="/opt/tomcat/conf/schema_type.xml" />
</types>
<fields>
<field>....
...
</fields>
</schema>
Thanks in advance for any help.
robbin
Robbin,
I've never used xinclude feature so far, but seems that Solr
always expects the path is relative CWD:
https://issues.apache.org/jira/browse/SOLR-1656
So avoid to use absolute path in href.
Koji
--
http://www.rondhuit.com/en/