Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make productionPlace multiple, facetable, and enabled for Advanced Search #9253 #9254

Merged
merged 10 commits into from
Feb 9, 2023
2 changes: 1 addition & 1 deletion conf/solr/8.11.1/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
<field name="producerName" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="producerURL" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="productionDate" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="productionPlace" type="text_en" multiValued="false" stored="true" indexed="true"/>
<field name="productionPlace" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="publication" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="publicationCitation" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="publicationIDNumber" type="text_en" multiValued="true" stored="true" indexed="true"/>
Expand Down
42 changes: 42 additions & 0 deletions doc/release-notes/9253-productionPlace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Metadata field Production Location now repeatable, facetable, and enabled for Advanced Search
This enhancement allows depositors to define multiple instances of the metadata field Production Location in the Citation Metadata block, users to filter search results using the filter facets, and using the field in the Advanced Search option.

## Major Use Cases and Infrastructure Enhancements
* Data contained in a dataset may have been produced at multiple places. Making the field Production Location repeatable will make it possible to reflect this fact in the dataset metadata. Making the field facetable and enabled for Advanced Search will allow us to customize Dataverse collections more appropriately. (Issue #9253, PR #9254)
pdurbin marked this conversation as resolved.
Show resolved Hide resolved
pdurbin marked this conversation as resolved.
Show resolved Hide resolved

### Additional Upgrade Steps

Update the Citation metadata block:

- `wget https://github.com/IQSS/dataverse/releases/download/v5.13/citation.tsv`
- `curl http://localhost:8080/api/admin/datasetfield/load -X POST --data-binary @citation.tsv -H "Content-type: text/tab-separated-values"`

## Additional Release Steps

1\. Replace Solr schema.xml to allow multiple production locations to be used. See specific instructions below for those installations without custom metadata blocks (1a) and those with custom metadata blocks (1b).

1a\.

For installations without Custom Metadata Blocks:

-stop solr instance (usually service solr stop, depending on solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/5.13/installation/prerequisites.html#solr-init-script)

-replace schema.xml

cp /tmp/dvinstall/schema.xml /usr/local/solr/solr-8.11.1/server/solr/collection1/conf

-start solr instance (usually service solr start, depending on solr/OS)


1b\.

For installations with Custom Metadata Blocks:

-stop solr instance (usually service solr stop, depending on solr installation/OS, see the [Installation Guide](https://guides.dataverse.org/en/5.13/installation/prerequisites.html#solr-init-script)

- edit the following line to your schema.xml (to indicate that productionPlace is now multiValued='true"):

`<field name="productionPlace" type="string" stored="true" indexed="true" multiValued="true"/>`

- restart solr instance (usually service solr start, depending on solr/OS)

2 changes: 1 addition & 1 deletion scripts/api/data/metadatablocks/citation.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
producerURL URL The URL of the producer's website https:// url 39 <a href="#VALUE" target="_blank" rel="noopener">#VALUE</a> FALSE FALSE FALSE FALSE FALSE FALSE producer citation
producerLogoURL Logo URL The URL of the producer's logo https:// url 40 <img src="#VALUE" alt="#NAME" class="metadata-logo"/><br/> FALSE FALSE FALSE FALSE FALSE FALSE producer citation
productionDate Production Date The date when the data were produced (not distributed, published, or archived) YYYY-MM-DD date 41 TRUE FALSE FALSE TRUE FALSE FALSE citation
productionPlace Production Location The location where the data and any related materials were produced or collected text 42 FALSE FALSE FALSE FALSE FALSE FALSE citation
productionPlace Production Location The location where the data and any related materials were produced or collected text 42 TRUE FALSE TRUE TRUE FALSE FALSE citation
contributor Contributor The entity, such as a person or organization, responsible for collecting, managing, or otherwise contributing to the development of the Dataset none 43 : FALSE FALSE TRUE FALSE FALSE FALSE citation http://purl.org/dc/terms/contributor
contributorType Type Indicates the type of contribution made to the dataset text 44 #VALUE TRUE TRUE FALSE TRUE FALSE FALSE contributor citation
contributorName Name The name of the contributor, e.g. the person's name or the name of an organization 1) FamilyName, GivenName or 2) Organization text 45 #VALUE TRUE FALSE FALSE TRUE FALSE FALSE contributor citation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,9 @@ private void processProdStmt(XMLStreamReader xmlr, MetadataBlockDTO citation) th
} else if (xmlr.getLocalName().equals("prodDate")) {
citation.getFields().add(FieldDTO.createPrimitiveFieldDTO("productionDate", parseDate(xmlr, "prodDate")));
} else if (xmlr.getLocalName().equals("prodPlac")) {
citation.getFields().add(FieldDTO.createPrimitiveFieldDTO("productionPlace", parseDate(xmlr, "prodPlac")));
List<String> prodPlac = new ArrayList<>();
prodPlac.add(parseText(xmlr, "prodPlac"));
citation.getFields().add(FieldDTO.createMultiplePrimitiveFieldDTO(DatasetFieldConstant.productionPlace, prodPlac));
} else if (xmlr.getLocalName().equals("software")) {
HashSet<FieldDTO> set = new HashSet<>();
addToSet(set,"softwareVersion", xmlr.getAttributeValue(null, "version"));
Expand Down