[ 
https://issues.apache.org/jira/browse/SOLR-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943278#comment-13943278
 ] 

Tomás Fernández Löbbe commented on SOLR-5228:
---------------------------------------------

{quote}
The schema version changes how Solr interprets default settings. I'm fairly 
sure that it has nothing to do with the XML structure. I don't think we need a 
new schema version for this.
{quote}
Schema version should be used for whatever is necessary. It should be telling 
Solr how the schema.xml should be read, and I think this is a good case. I 
think it would make more clear which type of schema you want to use. Also, in 
case of an external tool reading Solr schema, it could tell how it should be 
read. That said, I’m OK with increasing it or not, it's just an idea.

{quote}
People can still use the old style if they want.
{quote}
I think this could lead to confusion. Someone that’s new with Solr will 
probably read a couple of sample schema files (the example schema for sure, but 
also probably also reading from blogs, forums, etc), that will be different but 
do the same thing, trying to track a bug may be more complicated until they 
understand this change. I’d prefer to get a clear error that says that I’m 
configuring the fields/types in the wrong place, that it has changed, or 
something like that. 
Migrating this should be easier, because by that time you probably have more 
understanding of how the schema is structured and why/how it has change. After 
that, it's a trivial change.

> Don't require <field> or <dynamicField> be inside of <fields> -- or that 
> <fieldType> be inside of <types>
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5228
>                 URL: https://issues.apache.org/jira/browse/SOLR-5228
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>
> On the solr-user mailing list, Nutan recently mentioned spending days trying 
> to track down a problem that turned out to be because he had attempted to add 
> a {{<dynamicField .. />}} that was outside of the {{<fields>}} block in his 
> schema.xml -- Solr was just silently ignoring it.
> We have made improvements in other areas of config validation by generating 
> statup errors when tags/attributes are found that are not expected -- but in 
> this case i think we should just stop expecting/requiring that the 
> {{<fields>}} and {{<types>}} tags will be used to group these sorts of 
> things.  I think schema.xml parsing should just start ignoring them and only 
> care about finding the {{<field>}}, {{<dynamicField>}}, and {{<fieldType>}} 
> tags wherever they may be.
> If people want to keep using them, fine.  If people want to mix fieldTypes 
> and fields side by side (perhaps specify a fieldType, then list all the 
> fields using it) fine.  I don't see any value in forcing people to use them, 
> but we definitely shouldn't leave things the way they are with otherwise 
> perfectly valid field/type declarations being silently ignored.
> ---
> I'll take this on unless i see any objections.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to