Skip to content

Commit

Permalink
Merge pull request #9254 from philippconzett/patch-2
Browse files Browse the repository at this point in the history
Make productionPlace multiple, facetable, and enabled for Advanced Search #9253
  • Loading branch information
kcondon authored Feb 9, 2023
2 parents f40df82 + 0978dbd commit ceffb6f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
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)

### 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)

3 changes: 2 additions & 1 deletion doc/sphinx-guides/source/_static/api/ddi_dataset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<producer affiliation="ProducerAffiliation1" abbr="ProducerAbbreviation1" role="http://ProducerLogoURL1.org" URI="http://ProducerURL1.org">LastProducer1, FirstProducer1</producer>
<producer affiliation="ProducerAffiliation2" abbr="ProducerAbbreviation2" role="http://ProducerLogoURL2.org" URI="http://ProducerURL2.org">LastProducer2, FirstProducer2</producer>
<prodDate>1003-01-01</prodDate>
<prodPlac>ProductionPlace</prodPlac>
<prodPlac>ProductionPlace One</prodPlac>
<prodPlac>ProductionPlace Two</prodPlac>
<software version="SoftwareVersion1">SoftwareName1</software>
<software version="SoftwareVersion2">SoftwareName2</software>
<grantNo agency="GrantInformationGrantAgency1">GrantInformationGrantNumber1</grantNo>
Expand Down
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

0 comments on commit ceffb6f

Please sign in to comment.