There is an issue with org.apache.solr.handler.dataimport.DocBuilder:addFields around ~line 643. The logic currently says see if you can find the field from the schema, ie:
and, if not found, go ask DIHConfiguration to find it, ie:
The latter call takes into account case-insensitivity, which is a big deal since some databases, ie: DB2, upper case all the resulting column names. In order to not modify solr-core (ie: the match logic in IndexSchema), I'm attaching a patch that makes DIHConfiguration apply the same case-insensitive logic to the DynamicFields.
Without this patch, dynamic fields will not be added to the index unless you declare them like this:
(note the capital S)
which is in-consistent with what I believe to be solr schema conventions to have all the schema fields as lower-case.