Hide
The 2.0.0 implementation of this class has a few things ripe for refactoring:
1. use solr.yml / DisplayFields rather than hardcoded field names (raw metadata field, solr doc id field)
2. allow for marc21, marcxml, and other types of raw metadata.
One idea is to have either a solr.yml value OR a field in the solr document that indicates what sort of raw data is present. Then you have a case statement in SolrDocument that parses that raw data appropriately. We have the marc gem to do that for marcxml and for marc21; other formats will need to be added in with some other gem help or some code we write.
If we specify raw metadata format with a field in the solr document, it allows for heterogeneous metadata in a single index.
This expands the utility of the to_xml method, sets up SolrDocument to be more versatile for the citation, RSS, and other export metadata formats.
It does not address what to do when a single solr document has multiple types of raw metadata. But we can tackle that if and when the situation arises.
Show
The 2.0.0 implementation of this class has a few things ripe for refactoring:
1. use solr.yml / DisplayFields rather than hardcoded field names (raw metadata field, solr doc id field)
2. allow for marc21, marcxml, and other types of raw metadata.
One idea is to have either a solr.yml value OR a field in the solr document that indicates what sort of raw data is present. Then you have a case statement in SolrDocument that parses that raw data appropriately. We have the marc gem to do that for marcxml and for marc21; other formats will need to be added in with some other gem help or some code we write.
If we specify raw metadata format with a field in the solr document, it allows for heterogeneous metadata in a single index.
This expands the utility of the to_xml method, sets up SolrDocument to be more versatile for the citation, RSS, and other export metadata formats.
It does not address what to do when a single solr document has multiple types of raw metadata. But we can tackle that if and when the situation arises.
SolrDocument now supports both Marc21 and Marc-XML