Edwin Stauthamer wrote:
Hi,

I want to index a perfectly good solr XML-file into an Solr/Lucene instance.
The problem is that the XML has many fields that I don't want to be indexed.

I tried to index the file but Solr gives me an error because the XML
contains fields that I have not declared in my schema.xml

How can I tell Solr to skip unwanted fields and only index the fields that I
have declared in my schema.xml?

How about using "ignored" type for the fields which you don't want to be indexed:

<fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" />

<field name="unwanted-field-1" type="ignored" multiValued="true"/>
<field name="unwanted-field-2" type="ignored" multiValued="true"/>
<field name="unwanted-field-3" type="ignored" multiValued="true"/>
   :

Koji

I know it must be something with a catchall setting and / or copyFields but
I can not get the configuration right. To be clear. I want Solr to index /
store only a few fields from the XML-file to be indexed and skip all the
other fields.

An answer or a link to a good reference would help.


Reply via email to