From 09b603925d565e34ce970739338631caef91ae4f Mon Sep 17 00:00:00 2001 From: Giambattista Bloisi Date: Thu, 18 Apr 2024 13:13:15 +0200 Subject: [PATCH] initial stage --- airflow/dags/EOSC_entity_trasform.py | 2 +- airflow/dags/EOSC_indexes.py | 93 ++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) diff --git a/airflow/dags/EOSC_entity_trasform.py b/airflow/dags/EOSC_entity_trasform.py index 749b73d..c673c90 100644 --- a/airflow/dags/EOSC_entity_trasform.py +++ b/airflow/dags/EOSC_entity_trasform.py @@ -46,7 +46,7 @@ def trasform_interoperability(p: dict) -> dict: if 'domain' in p: p['domain'] = {"domain": p['domain']} p['licenseDetails'] = p['license'] - p['license'] = p['license']['title'] if 'title' in p['license'] else '' + p['license'] = p['license']['identifier'] if 'identifier' in p['license'] else '' return p diff --git a/airflow/dags/EOSC_indexes.py b/airflow/dags/EOSC_indexes.py index f74e93c..eea6df6 100644 --- a/airflow/dags/EOSC_indexes.py +++ b/airflow/dags/EOSC_indexes.py @@ -833,9 +833,72 @@ mappings['services'] = { mappings['interoperability'] = { "properties": { + "alternativeIdentifiers": { + "type": "object", + "properties": { + "alternativeIdentifier": { + "type": "object", + "properties": { + "type": { + "type": "keyword" + }, + "value": { + "type": "keyword" + } + } + } + } + }, + "creators": { + "type": "object", + "properties": { + "affiliation": { + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "type": "text" + }, + "familyName": { + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "type": "text" + }, + "fullName": { + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "type": "text" + }, + "givenName": { + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "type": "text" + }, + "type": { + "type": "keyword" + } + } + }, "description": { "type": "text" }, + "doi": { + "type": "keyword" + }, "domain": { "type": "object", "properties": { @@ -856,6 +919,20 @@ mappings['interoperability'] = { "license": { "type": "keyword" }, + "licenseDetails": { + "type": "object", + "properties": { + "identifier": { + "type": "keyword" + }, + "title": { + "type": "text" + }, + "uri": { + "type": "text" + } + } + }, "organization": { "fields": { "keyword": { @@ -865,6 +942,19 @@ mappings['interoperability'] = { }, "type": "text" }, + "provider": { + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "type": "keyword" + }, + "providers": { + "path": "provider", + "type": "alias" + }, "publicationYear": { "type": "long" }, @@ -879,6 +969,9 @@ mappings['interoperability'] = { } } }, + "status": { + "type": "keyword" + }, "title": { "type": "text" },