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

10288 Add keywordTermURI metadata in keyword block #10371

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a5f4bd7
New keywordTermURI Metadata in keyword Metadata Block
stevenferey Feb 7, 2024
9f72845
update of the keywordVocabularyURI metadata to make it consistent wit…
stevenferey Feb 7, 2024
c103610
fix description and watermark properties
stevenferey Feb 7, 2024
ebe2e02
Merge branch 'develop' into 10288-add-Term-URI-metadata-in-Keyword-block
stevenferey Feb 27, 2024
5e9d934
10288 adding documentation
stevenferey Feb 28, 2024
221311c
10288 - adaptation of the SolR schema and dataset exports
stevenferey Mar 1, 2024
f4efb01
10288 - Adjustment of typo and sql
stevenferey Mar 12, 2024
5e6f37f
Merge branch 'IQSS:develop' into 10288-add-Term-URI-metadata-in-Keywo…
stevenferey Apr 3, 2024
3464212
Adaptations for Dataverse 6.2
stevenferey Apr 3, 2024
c54b390
10288 - rollback keywordVocabularyURL to keywordVocabularyURI
luddaniel Apr 17, 2024
973e026
Merge pull request #3 from Recherche-Data-Gouv/10288-add-Term-URI-met…
stevenferey Apr 17, 2024
ff70b10
Merge branch 'develop' into 10288-add-Term-URI-metadata-in-Keyword-block
stevenferey Apr 17, 2024
7a980ab
10288 - removing obsolete SQL script
stevenferey Apr 24, 2024
05feae2
10288 - Label modification to follow Dataverse recommendations
stevenferey May 2, 2024
b0a5b23
Merge branch 'IQSS:develop' into 10288-add-Term-URI-metadata-in-Keywo…
stevenferey May 15, 2024
cc3e551
Merge branch 'IQSS:develop' into 10288-add-Term-URI-metadata-in-Keywo…
stevenferey May 27, 2024
165100d
10288 - Added valueURI attribute for OpenAire export
stevenferey May 28, 2024
a79cdbf
Fix NoResultException on DatasetServiceBean.findDeep (.getSingleResul…
luddaniel May 29, 2024
d42b388
Merge branch 'develop' into 10288-add-Term-URI-metadata-in-Keyword-block
jeromeroucou Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conf/solr/9.3.0/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
<field name="journalVolumeIssue" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="keyword" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="keywordValue" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="keywordTermURI" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="keywordVocabulary" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="keywordVocabularyURI" type="text_en" multiValued="true" stored="true" indexed="true"/>
<field name="kindOfData" type="text_en" multiValued="true" stored="true" indexed="true"/>
Expand Down Expand Up @@ -565,6 +566,7 @@
<copyField source="journalVolumeIssue" dest="_text_" maxChars="3000"/>
<copyField source="keyword" dest="_text_" maxChars="3000"/>
<copyField source="keywordValue" dest="_text_" maxChars="3000"/>
<copyField source="keywordTermURI" dest="_text_" maxChars="3000"/>
<copyField source="keywordVocabulary" dest="_text_" maxChars="3000"/>
<copyField source="keywordVocabularyURI" dest="_text_" maxChars="3000"/>
<copyField source="kindOfData" dest="_text_" maxChars="3000"/>
Expand Down
53 changes: 53 additions & 0 deletions doc/release-notes/10288-add-term_uri-metadata-in-keyword-block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
### New keywordTermURI Metadata in keyword Metadata Block

Adding a new metadata `keywordTermURI` to the `keyword` metadata block to facilitate the integration of controlled vocabulary services, in particular by adding the possibility of saving the "term" and its associated URI. For more information, see #10288 and PR #10371.

## Upgrade Instructions

1\. Update the Citation metadata block

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

2\. Update your Solr `schema.xml` to include the new field.

For details, please see https://guides.dataverse.org/en/latest/admin/metadatacustomization.html#updating-the-solr-schema


3\. Reindex Solr.

Once the schema.xml is updated, Solr must be restarted and a reindex initiated.
For details, see https://guides.dataverse.org/en/latest/admin/solr-search-index.html but here is the reindex command:

`curl http://localhost:8080/api/admin/index`


4\. Run ReExportAll to update dataset metadata exports. Follow the instructions in the [Metadata Export of Admin Guide](https://guides.dataverse.org/en/latest/admin/metadataexport.html#batch-exports-through-the-api).


## Notes for Dataverse Installation Administrators

### Data migration to the new `keywordTermURI` field

You can migrate your `keywordValue` data containing URIs to the new `keywordTermURI` field.
In case of data migration, view the affected data with the following database query:

```
SELECT value FROM datasetfieldvalue dfv
INNER JOIN datasetfield df ON df.id = dfv.datasetfield_id
WHERE df.datasetfieldtype_id = (SELECT id FROM datasetfieldtype WHERE name = 'keywordValue')
AND value ILIKE 'http%';
```

If you wish to migrate your data, a database update is then necessary:

```
UPDATE datasetfield df
SET datasetfieldtype_id = (SELECT id FROM datasetfieldtype WHERE name = 'keywordTermURI')
FROM datasetfieldvalue dfv
WHERE dfv.datasetfield_id = df.id
AND df.datasetfieldtype_id = (SELECT id FROM datasetfieldtype WHERE name = 'keywordValue')
AND dfv.value ILIKE 'http%';
```

A ['Reindex in Place'](https://guides.dataverse.org/en/latest/admin/solr-search-index.html#reindex-in-place) will be required and ReExportAll will need to be run to update the metadata exports of the dataset. Follow the directions in the [Admin Guide](http://guides.dataverse.org/en/latest/admin/metadataexport.html#batch-exports-through-the-api).
12 changes: 12 additions & 0 deletions scripts/api/data/dataset-create-new-all-default-fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@
"typeClass": "primitive",
"value": "KeywordTerm1"
},
"keywordTermURI": {
"typeName": "keywordTermURI",
"multiple": false,
"typeClass": "primitive",
"value": "http://keywordTermURI1.org"
},
"keywordVocabulary": {
"typeName": "keywordVocabulary",
"multiple": false,
Expand All @@ -251,6 +257,12 @@
"typeClass": "primitive",
"value": "KeywordTerm2"
},
"keywordTermURI": {
"typeName": "keywordTermURI",
"multiple": false,
"typeClass": "primitive",
"value": "http://keywordTermURI2.org"
},
"keywordVocabulary": {
"typeName": "keywordVocabulary",
"multiple": false,
Expand Down
Loading
Loading