[
https://issues.apache.org/jira/browse/SOLR-16810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17817884#comment-17817884
]
Jan Høydahl commented on SOLR-16810:
------------------------------------
To be honest this is a very corner case - that piece of code has been the same
forever and there seems to be no urgent need for any fix. Took a quick peek at
the PR and I would definitely not merge it, I think there is a larger risk of
regression than the benefit of this particular fix.
I'm more in favor of looking at a cleanup in 10.0, e.g.
* Use standard XML libs for encoding schema, get rid of XML.java (how widely
is XML.java used in our codebase?)
* Consider enforcing formal field name rules, as permissive as possible while
still easy to formulate the rules.
> Under certain situations Solr produces managed schema XML that cannot be
> loaded
> -------------------------------------------------------------------------------
>
> Key: SOLR-16810
> URL: https://issues.apache.org/jira/browse/SOLR-16810
> Project: Solr
> Issue Type: Bug
> Components: Schema and Analysis
> Affects Versions: 9.2.1
> Reporter: Thiruvalluvan M. G.
> Assignee: Eric Pugh
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> While persisting the {{ManagedIndexSchema}} as XML, non-printable characters
> in field names get escaped as {{{}#nn;{}}}, where {{nn}} is the decimal
> representation of the non-printable character. For example, if the field name
> has the byte {{{}0x14{}}}, it gets escaped as {{{}#20;{}}}. This in
> indistinguishable from the literal {{#20;}} in the field name. If we have two
> fields - one with the non-printable character and the other with the literal
> string, two fields get generated with the same name. Loading the resulting
> XML, naturally, causes an exception. To fix this, any occurrence of literal
> {{#}} in the field name should be escaped, with say {{{}##{}}}.
> A second problem is that while escaping happens when generating XML, the
> corresponding unescaping does not happen on loading it. This asymmetry should
> be fixed as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]