From 660bb80d623bc7403121289063438ad2b51ac44b Mon Sep 17 00:00:00 2001 From: Fatimah Zulfiqar Date: Wed, 4 Dec 2024 14:05:01 +0100 Subject: [PATCH] schema: added identifiers to subjects --- invenio_rdm_records/records/api.py | 2 +- .../os-v1/rdmrecords/drafts/draft-v6.0.0.json | 10 ++++++++++ .../rdmrecords/records/record-v7.0.0.json | 10 ++++++++++ .../os-v2/rdmrecords/drafts/draft-v6.0.0.json | 10 ++++++++++ .../rdmrecords/records/record-v7.0.0.json | 19 ++++++++++++------- .../v7/rdmrecords/drafts/draft-v6.0.0.json | 10 ++++++++++ .../v7/rdmrecords/records/record-v6.0.0.json | 10 ++++++++++ 7 files changed, 63 insertions(+), 8 deletions(-) diff --git a/invenio_rdm_records/records/api.py b/invenio_rdm_records/records/api.py index 377ef6c82..83180c770 100644 --- a/invenio_rdm_records/records/api.py +++ b/invenio_rdm_records/records/api.py @@ -184,7 +184,7 @@ class CommonFieldsMixin: ), subjects=PIDListRelation( "metadata.subjects", - keys=["subject", "scheme", "props"], + keys=["subject", "scheme", "props", "identifiers"], pid_field=Subject.pid, cache_key="subjects", ), diff --git a/invenio_rdm_records/records/mappings/os-v1/rdmrecords/drafts/draft-v6.0.0.json b/invenio_rdm_records/records/mappings/os-v1/rdmrecords/drafts/draft-v6.0.0.json index 3c532097e..2e78f22ae 100644 --- a/invenio_rdm_records/records/mappings/os-v1/rdmrecords/drafts/draft-v6.0.0.json +++ b/invenio_rdm_records/records/mappings/os-v1/rdmrecords/drafts/draft-v6.0.0.json @@ -1238,6 +1238,16 @@ "props": { "type": "object", "dynamic": "true" + }, + "identifiers": { + "properties": { + "identifier": { + "type": "keyword" + }, + "scheme": { + "type": "keyword" + } + } } } }, diff --git a/invenio_rdm_records/records/mappings/os-v1/rdmrecords/records/record-v7.0.0.json b/invenio_rdm_records/records/mappings/os-v1/rdmrecords/records/record-v7.0.0.json index 3e3cd6600..ef3b4c32a 100644 --- a/invenio_rdm_records/records/mappings/os-v1/rdmrecords/records/record-v7.0.0.json +++ b/invenio_rdm_records/records/mappings/os-v1/rdmrecords/records/record-v7.0.0.json @@ -1256,6 +1256,16 @@ "props": { "type": "object", "dynamic": "true" + }, + "identifiers": { + "properties": { + "identifier": { + "type": "keyword" + }, + "scheme": { + "type": "keyword" + } + } } } }, diff --git a/invenio_rdm_records/records/mappings/os-v2/rdmrecords/drafts/draft-v6.0.0.json b/invenio_rdm_records/records/mappings/os-v2/rdmrecords/drafts/draft-v6.0.0.json index 0d93f5410..a9fedc421 100644 --- a/invenio_rdm_records/records/mappings/os-v2/rdmrecords/drafts/draft-v6.0.0.json +++ b/invenio_rdm_records/records/mappings/os-v2/rdmrecords/drafts/draft-v6.0.0.json @@ -1238,6 +1238,16 @@ "props": { "type": "object", "dynamic": "true" + }, + "identifiers": { + "properties": { + "identifier": { + "type": "keyword" + }, + "scheme": { + "type": "keyword" + } + } } } }, diff --git a/invenio_rdm_records/records/mappings/os-v2/rdmrecords/records/record-v7.0.0.json b/invenio_rdm_records/records/mappings/os-v2/rdmrecords/records/record-v7.0.0.json index de3b0a3de..6af64c11c 100644 --- a/invenio_rdm_records/records/mappings/os-v2/rdmrecords/records/record-v7.0.0.json +++ b/invenio_rdm_records/records/mappings/os-v2/rdmrecords/records/record-v7.0.0.json @@ -45,13 +45,8 @@ "accent_analyzer": { "tokenizer": "standard", "type": "custom", - "char_filter": [ - "strip_special_chars" - ], - "filter": [ - "lowercase", - "asciifolding" - ] + "char_filter": ["strip_special_chars"], + "filter": ["lowercase", "asciifolding"] } } } @@ -1248,6 +1243,16 @@ "props": { "type": "object", "dynamic": "true" + }, + "identifiers": { + "properties": { + "identifier": { + "type": "keyword" + }, + "scheme": { + "type": "keyword" + } + } } } }, diff --git a/invenio_rdm_records/records/mappings/v7/rdmrecords/drafts/draft-v6.0.0.json b/invenio_rdm_records/records/mappings/v7/rdmrecords/drafts/draft-v6.0.0.json index 1a901cbfe..cb454eeeb 100644 --- a/invenio_rdm_records/records/mappings/v7/rdmrecords/drafts/draft-v6.0.0.json +++ b/invenio_rdm_records/records/mappings/v7/rdmrecords/drafts/draft-v6.0.0.json @@ -1238,6 +1238,16 @@ "props": { "type": "object", "dynamic": "true" + }, + "identifiers": { + "properties": { + "identifier": { + "type": "keyword" + }, + "scheme": { + "type": "keyword" + } + } } } }, diff --git a/invenio_rdm_records/records/mappings/v7/rdmrecords/records/record-v6.0.0.json b/invenio_rdm_records/records/mappings/v7/rdmrecords/records/record-v6.0.0.json index 941fca4e4..9330c674c 100644 --- a/invenio_rdm_records/records/mappings/v7/rdmrecords/records/record-v6.0.0.json +++ b/invenio_rdm_records/records/mappings/v7/rdmrecords/records/record-v6.0.0.json @@ -1195,6 +1195,16 @@ "props": { "type": "object", "dynamic": "true" + }, + "identifiers": { + "properties": { + "identifier": { + "type": "keyword" + }, + "scheme": { + "type": "keyword" + } + } } } },