I'm trying to determine if it's possible to use Xinclude to (for
example) have a base schema file and then substitute various pieces.

It seems that the schema fieldTypes throw exceptions if there is an
unexpected attribute?

SEVERE: java.lang.RuntimeException: schema fieldtype
text(org.apache.solr.schema.TextField) invalid
arguments:{xml:base=solr/core2/conf/text-analyzer.xml}

This is what I'm trying to do (details of the analyzer chain omitted -
nothing unusual) - so the error occurs when the external xml file is
actually included:

<xi:include  href="solr/core2/conf/text-analyzer.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"; >
  <xi:fallback>
    <fieldType name="text" class="solr.TextField" positionIncrementGap="100" >
      <analyzer type="index">
...
      </analyzer>
      <analyzer type="query">
...
      </analyzer>
    </fieldType>
  </xi:fallback>
</xi:include>


Where (for testing) the text-analyzer.xml file just looks like the fallback:


<?xml version="1.0" encoding="UTF-8" ?>
    <fieldType name="text" class="solr.TextField" positionIncrementGap="100" >
      <analyzer type="index">
...
      </analyzer>
      <analyzer type="query">
...
      </analyzer>
    </fieldType>


-- 
Peter M. Wolanin, Ph.D.
Momentum Specialist,  Acquia. Inc.
peter.wola...@acquia.com

Reply via email to