[
https://issues.apache.org/jira/browse/SOLR-5545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13845285#comment-13845285
]
Uwe Schindler commented on SOLR-5545:
-------------------------------------
Actually, the Tokenizer/TokenFilter/CharFilters already throw an exception, if
they get invalid properties as attributes. This only works with "new"
factories, older ones maybe from plugins cannot handle this. All the provided
ones from the distribution of Lucene can do this.
But we do not check the general structure of the XML document. I don't think a
schema would help (as Hoss pointed out), but we can maybe handle that in the
schema parser that it throws execption on unknown elements / attributes (like
the analysis factories do).
> Solr should warn if schema.xml has unrecognized tags or typos in tag names
> --------------------------------------------------------------------------
>
> Key: SOLR-5545
> URL: https://issues.apache.org/jira/browse/SOLR-5545
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.6
> Environment: OSX 10.9, JDK 1.7.0_25
> Reporter: Stepan Ovsyankin
>
> If schema.xml contains unknown tags (tag names with typos) but the document
> is well-formed then Solr starts without letting user know that there are some
> potential configuration problems. For example, here is schema.xml I had:
> {code:xml}
> <fieldType name="text_engram_front" class="solr.TextField">
> <avalyzer type="index">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.ICUTransformFilterFactory"
> id="Any-Latin;Latin-ASCII;Lower()"/>
> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="20"/>
> </avalyzer>
> <analyzer type="query">
> <!-- skipped -->
> </analyzer>
> </fieldType>
> {code}
> Note that index analyzer tag name is written as avalyzer (it's _v_ instead of
> _n_). Solr would save me several hours if it logged a warning that schema.xml
> contains unknown tags.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]