Configuration files for SolR DataImportHandler contain the SQL queries to run against the database, how to map the resulting columns to SolR document fields and, of course, the parameters needed to connect to the database.
In our project, the database connection parameters (specifically the database passwords) change from environment to environment, which forces us to maintain one slightly different copy of the whole configuration XML file for each environment.
Is there a way to configure the database connection parameters (specially the passwords) separately from the SQL statements and declarations, so each configuration is maintained Once and Only Once?
this is a known issue in Solr.
If you look at the Solr doc, or at the Solr Entreprise Server book, they say you can use a core1.properties with key=value and use key in your xml config files...but in my experience it does not work. I have tried it several ways, there are open questions on the solr mailing list about this.
So you have to resort to ugly workarounds (like using a template xml file and replacing #password# with the real password etc).