lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Problems using fieldType text_general in copyField
Date Thu, 04 Aug 2016 21:55:12 GMT

you mentioned that the problem only happens when you use xinclude, but you 
havne't shown us hte details of your xinclude -- what exactly does your 
schema.xml look like (with the xinclude call) and what exactly does the 
file being included look like (entire contents)

(I suspect the problem you are seeing is realted to the way xinclude 
doens't really support "snippets" of malformed xml, and instead requires 
some root tag -- i can't imagine what root tag you are using in the 
included file that would play nicely with mixing/matching field 
declarations. ... using xml entity includes may be a simpler/safer option)



: Date: Thu, 4 Aug 2016 15:47:00 -0600
: From: John Bickerstaff <john@johnbickerstaff.com>
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: Problems using fieldType text_general in copyField
: 
: I would call this a bug...
: 
: I'm going out on a limb and say that if you define a field in the included
: XML file, you will get this error.
: 
: As long as the field is defined first in schema.xml, you can "copyFIeld" it
: or whatever in the include file, but apparently fields MUST be created in
: the schema.xml file.
: 
: That makes use of the include for custom things somewhat moot - at least in
: my situation.
: 
: I'd love to be wrong by the way, but that's what my tests suggest right
: now...
: 
: On Thu, Aug 4, 2016 at 1:37 PM, John Bickerstaff <john@johnbickerstaff.com>
: wrote:
: 
: > Summary:
: >
: > Using xinclude to include an xml file into schema.xml
: >
: > The following line
: >
: > <copyField source="content" dest="text"/>
: >
: > generates an error:  about a field being "not a glob and not matching an
: > explicit field" even though I declare the field in the line just above.
: >
: > This seems to happen only for for fieldType text_general?
: >
: > ============
: >
: > Explanation:
: >
: > I need a little help - keep getting an error when trying to use the
: > ability to include an additional XML file.  I may be overlooking something,
: > but if so, I need help to see it.
: >
: > I have the following two lines which throw zero errors when part of
: > schema.xml:
: >
: > <field name="content" type="text_general" indexed="false" stored="true"
: > multiValued="true"/>
: >  <copyField source="content" dest="text"/>
: >
: > However, when I put this into an include file and use xinclude, then I get
: > this error when starting Solr.
: >
: >
: >
: >    - *statdx_shard1_replica3:* org.apache.solr.common.
: >    SolrException:org.apache.solr.common.SolrException: Could not load
: >    conf for core statdx_shard1_replica3: Can't load schema schema.xml:
: >    copyField source :'content' is not a glob and doesn't match any explicit
: >    field or dynamicField.
: >
: >
: > Given that I am defining the field in the line right above the copyField
: > statement, I'm confused about why this works fine in schema.xml but NOT in
: > an included file.
: >
: > I experimented and found that any field of type "text_general" will throw
: > this same error if it is part of the included xml file.  Other fieldTypes
: > that I tried (string, int, double) did not have this issue.
: >
: > I'm using Solr 5.4, although I'm pulling custom config into an included
: > file for purposes of moving to 6.1
: >
: > I have the following list of copyField commands in the included xml file,
: > and get no errors on any but the "content" one.  It just so happens that
: > "content" is the only field of type "text_general" in there.
: >
: >
: > Any hints greatly appreciated.
: >
: >   <copyField source="title" dest="text"/>
: >    <copyField source="author" dest="text"/>
: >    <copyField source="description" dest="text"/>
: >    <copyField source="keywords" dest="text"/>
: >    <copyField source="content" dest="text"/>
: >    <copyField source="content_type" dest="text"/>
: >    <copyField source="resourcename" dest="text"/>
: >    <copyField source="url" dest="text"/>
: >
: >
: 

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

Mime
View raw message