I agree, the default schema should preserve the strictness of the existing core as it's already helped me figure out more than a few problems. Having the documented option to bypass that error is also nice.
Fyi: the second patch does include a log.finest() message about ignoring the field. I wasn't sure what level would be appropriate but that was the same level used in the rest of the class. - will -----Original Message----- From: J.J. Larrea (JIRA) [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 2:54 PM To: solr-dev@lucene.apache.org Subject: [jira] Commented: (SOLR-217) schema option to ignore unused fields [ https://issues.apache.org/jira/browse/SOLR-217?page=com.atlassian.jira.p lugin.system.issuetabpanels:comment-tabpanel#action_12492369 ] J.J. Larrea commented on SOLR-217: ---------------------------------- +1 to Hoss' elaboration of Yonik's suggested approach, except for reverse-compatibility (where we DO want an error for unknown fields) schema.xml should probably read something like: <!-- since fields of this type are by default not stored or indexed, any data added to them will be ignored outright --> <fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" /> ... <!-- uncomment the following to ignore any fields that don't already match an existing field name or dynamic field, rather than reporting them as an error. alternately, change the type="ignored" to some other type e.g. "text" if you want unknown fields indexed and/or stored by default --> <!--dynamicField name="*" type="ignored" /--> > schema option to ignore unused fields > ------------------------------------- > > Key: SOLR-217 > URL: https://issues.apache.org/jira/browse/SOLR-217 > Project: Solr > Issue Type: Improvement > Components: update > Affects Versions: 1.2 > Reporter: Will Johnson > Priority: Minor > Fix For: 1.2 > > Attachments: ignoreNonIndexedNonStoredField.patch, ignoreUnnamedFields.patch > > > One thing that causes problems for me (and i assume others) is that Solr is schema-strict in that unknown fields cause solr to throw exceptions and there is no way to relax this constraint. this can cause all sorts of serious problems if you have automated feeding applications that do things like SELECT * FROM table1 or where you want to add other fields to the document for processing purposes before sending them to solr but don't want to deal with 'cleanup' -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.