lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <>
Subject [jira] [Commented] (SOLR-5228) Deprecate <fields> and <types> tags in schema.xml
Date Mon, 05 May 2014 14:50:15 GMT


Shawn Heisey commented on SOLR-5228:

bq. I wonder if Solr should handle this in a generic sense... like if hypothetically there
was a special tag like <INCLUDE> that Solr auto-removes first things after it reads
the XML.  That would enable new uses of XInclude where today there is no natural enclosing
tag to do so.

I *really* like this idea.  If the issue doesn't show up in the next few hours (and hasn't
been filed already), I'll go ahead and file it.  My solrconfig.xml is almost entirely xinclude
tags.  I would have used all xinclude tags, but the admin, analysis, and jmx handlers didn't
make much sense to put into individual xml files, and I couldn't put them in an xml file together.
 Also, I have entirely too many includes, I'd like to be able to combine some of them together.

I've never touched xml/xpath parsing ... does the parser support an easy way of moving tags
up a level in the structure?  If we can convert XML to a NamedList, I would expect that to
be pretty easy.

> Deprecate <fields> and <types> tags in schema.xml
> -------------------------------------------------
>                 Key: SOLR-5228
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>            Reporter: Hoss Man
>            Assignee: Erick Erickson
>             Fix For: 4.8, 5.0
>         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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message