Allow solr module to index and search metadata fields that contain spaces

The metadata extractor writes field names that contain spaces, but solr does
not allow this and incorrectly indexes these fields.

An anonymous function would be cleaner for the callback, but it caused the style checker to fail badly.