We should add a function (or two) to pages/search/_metadata/helpers.js to do the following:
Get full metadata schema
Load both metadata schema files in that directory, combine and return them in a single object.
Translate Solr records for easier access in templates
Take a json object input from Solr, and use the lookup produced above to output and object with a format that uses the more readable id as key and includes a "meta" property with the field-specific attributes. For example:
input solr document json (partial):
{
dct_title_s: "CDC Social Vulnerability Index (SVI) 2000"
}
Use
discovery_app
branch.We should add a function (or two) to pages/search/_metadata/helpers.js to do the following:
Load both metadata schema files in that directory, combine and return them in a single object.
Take a json object input from Solr, and use the lookup produced above to output and object with a format that uses the more readable id as key and includes a "meta" property with the field-specific attributes. For example:
input solr document json (partial):
output object:
It's likely that we won't need all of these meta properties, but for now we should begin by making everything available.