diff options
-rw-r--r-- | fatcat_covid19/transform.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fatcat_covid19/transform.py b/fatcat_covid19/transform.py index 1d2fa7c..7803085 100644 --- a/fatcat_covid19/transform.py +++ b/fatcat_covid19/transform.py @@ -67,14 +67,17 @@ def fulltext_to_elasticsearch(row, force_bool=True): 'pmcid', 'isbn13', 'wikidata_qid', - 'arxiv_id', - 'jstor_id', - 'mag_id', + 'arxiv', + 'jstor', + 'mag', ] 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 + if key in ['arxiv', 'jstor', 'mag']: + t[key + "_id"] = release['ext_ids'].get(key) or None + else: + t[key] = release['ext_ids'].get(key) or None t['contrib_count'] = len(release['contribs'] or []) |