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

Benson Margulies commented on SOLR-5228:
----------------------------------------

I apologize for showing up so late with an opinion. I can't get over the 
feeling that this might be solving the wrong problem.

In XML, the structure of 

{code}
  <SOME_ITEMs>
    <SOME_ITEM>
    </SOME_ITEM>
    ...
</SOME_ITEMs>
{code}

is ancient and honorable. Yea, some schemas dispense with the container for the 
group, but plenty do not. The source of this was someone who misplaced an item 
and didn't get a diagnosis. _Why don't we concentrate on diagnosis?_ Why not 
create a schema and, by default, check it? It's not like we're in a giant hurry 
at start-up compared to the extra time of enabling a validating parse.

Grouping these guys together is harmless at worst and slight helpful at best.

If we are going to change the schema, I would beg that anyone changing it put 
forth an actual, well, _schema_ that is an accurate representation of what is 
allowed.

So I'm belatedly -1 on this change, for why tiny little bit its worth.



> Deprecate <fields> and <types> tags in schema.xml
> -------------------------------------------------
>
>                 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: Erick Erickson
>         Attachments: SOLR-5228.patch, SOLR-5228.patch
>
>
> 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