lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (SOLR-3604) The wiki claims all comments are wiped from solr.xml on save - we should fix this.
Date Sun, 08 Jul 2012 16:35:34 GMT


Uwe Schindler commented on SOLR-3604:

bq. I work on a product that has a class that edits solrconfig.xml and schema.xml. We keep
the DOM tree around and edit it directly for modifications - later we serialize it out with
changes, preserving comments. It seems to work out just fine - at the least it turns out a
lot better than just stripping the comments.

That's what I proposed 2 comments ago. It needs a major rewrite of the whole solr.xml parsing.
I would *not* directly edit the DOM tree (this is crazy), instead create a XSD schema and
create Java classes out of it (that wrap the DOM tree).

I just wanted to mention, that a XML parser is *not* required to preserve comments on de/serialization,
because the file semantically identical. So if you drop in a custom, high-speed XML parser
into your classpath, the comments may get lost. :-)

bq. I'm not sure why we do any XML writing manually - I have no problem replacing that.

Just crazy unneeded code, but as no XML-like syntax structure is available, the writer of
that code wrote it by hand, instead of, e.g., sending SAX events to TransformerHandler for
> The wiki claims all comments are wiped from solr.xml on save - we should fix this.
> ----------------------------------------------------------------------------------
>                 Key: SOLR-3604
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 4.0, 5.0

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message