aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-04-02 17:36:41 -0700
committerBryan Newbold <bnewbold@archive.org>2020-04-02 17:36:41 -0700
commit7c5d51190cb8e58dea6231b48dc942fb35ef54a9 (patch)
tree23267feb6eedfead299eba850a08f91a53412057
parentcbfa0d9e1ed1dca6fa34f134cf81d4dd8a0a99f8 (diff)
downloadfatcat-covid19-7c5d51190cb8e58dea6231b48dc942fb35ef54a9.tar.gz
fatcat-covid19-7c5d51190cb8e58dea6231b48dc942fb35ef54a9.zip
transform: include missing external idents
-rwxr-xr-xelastic_transform.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/elastic_transform.py b/elastic_transform.py
index 38c9ecf..587aabd 100755
--- a/elastic_transform.py
+++ b/elastic_transform.py
@@ -50,6 +50,8 @@ def fulltext_to_elasticsearch(row, force_bool=True):
'pages',
'number',
'license',
+ ]
+ EXT_IDS = [
'doi',
'pmid',
'pmcid',
@@ -61,6 +63,8 @@ def fulltext_to_elasticsearch(row, force_bool=True):
]
for key in BIBLIO_KEYS:
t[key] = release.get(key) or None
+ for key in EXT_IDS:
+ t[key] = release['ext_ids'].get(key) or None
abstracts = []
abstract_langs = []