summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-01-30 01:03:08 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-01-30 01:03:08 -0800
commitcaa588612b91181950697756eace8fda270fd092 (patch)
treef0377c11465f99b29df3ef9b544cf99605f17b67
parentca283a45cc151f3346e403c8d57f55ec75f40672 (diff)
downloadfatcat-caa588612b91181950697756eace8fda270fd092.tar.gz
fatcat-caa588612b91181950697756eace8fda270fd092.zip
add upper-case work-around from kibana map join
-rw-r--r--extra/elasticsearch/release_schema.json1
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/extra/elasticsearch/release_schema.json b/extra/elasticsearch/release_schema.json
index 07601f36..c0bbda22 100644
--- a/extra/elasticsearch/release_schema.json
+++ b/extra/elasticsearch/release_schema.json
@@ -53,6 +53,7 @@
"withdrawn_status": { "type": "keyword", "normalizer": "default", "copy_to": "biblio" },
"language": { "type": "keyword", "normalizer": "default" },
"country": { "type": "keyword", "normalizer": "default" },
+ "country_upper": { "type": "keyword", "normalizer": "caseSensitive" },
"volume": { "type": "keyword", "normalizer": "default", "copy_to": "biblio" },
"issue": { "type": "keyword", "normalizer": "default", "copy_to": "biblio" },
"pages": { "type": "keyword", "normalizer": "default", "copy_to": "biblio" },
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py
index 9aa3cece..ded239d3 100644
--- a/python/fatcat_tools/transforms/elasticsearch.py
+++ b/python/fatcat_tools/transforms/elasticsearch.py
@@ -157,6 +157,7 @@ def release_to_elasticsearch(entity, force_bool=True):
is_oa = True
if c_extra.get('country'):
t['country'] = c_extra['country']
+ t['country_upper'] = c_extra['country'].upper()
# fall back to release-level container metadata if container not linked or
# missing context