Solr 7 - managed-schema - How to ignore unnamed fields?

Viewed 1660

In Solr 6.x I had the following line in the managed-schema to ignore unmapped fields:

<dynamicField name="*" type="ignored" multiValued="true" /> 

This line tells Solr 6.x to ignore all unmapped / unnamed fields and worked fine until Solr 7.0.0.

Seems that Solr 7.0.0 does't support type="ignored" anymore and gives exception that "ignored" is unknown type.

After some tests, Solr 7 code review, etc, the only solution I have found so far is to have the following line:

<dynamicField name="*" type="text_general" multiValued="true" indexed="false" stored="false"/>

Seems that it works fine, but what would be the most appropriate / valid solution (configuration) for ignoring unmapped fields (fields that not mapped/named by managed-schema explicitly)?

Thanks!

1 Answers

The ignored field type is just what you've added yourself (and you can add it yourself to the schema if you need it). The old definition was:

<fieldType
  name="ignored"
  indexed="false"
  stored="false"
  docValues="false"
  multiValued="true"
  class="solr.StrField" />

You probably want to set docValues explicitly to false as well now.

Related