From 4e6bc246d01183f4c7ffad7d0d474e683f04c07f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 26 Feb 2020 11:28:05 -0800 Subject: ES container last tweaks --- python/fatcat_tools/transforms/elasticsearch.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/fatcat_tools') diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py index cbafca7e..8581febd 100644 --- a/python/fatcat_tools/transforms/elasticsearch.py +++ b/python/fatcat_tools/transforms/elasticsearch.py @@ -342,6 +342,9 @@ def container_to_elasticsearch(entity, force_bool=True): if entity.extra.get(key): t[key] = entity.extra[key] + if 'country' in t: + t['country_code'] = t.pop('country') + t['issns'] = [] if entity.issnl: t['issns'].append(entity.issnl) -- cgit v1.2.3