aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-12-03 17:20:45 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-12-03 17:22:43 -0800
commit9ad198b7a1e12504e3d4718e56edd0a7e8b5e61a (patch)
tree9d75ad05fc22855e2dd071879fcccb7e4327bc51
parentb0ccb0b027fa3ee75f21f4e7b8d3037f04499961 (diff)
downloadfatcat-9ad198b7a1e12504e3d4718e56edd0a7e8b5e61a.tar.gz
fatcat-9ad198b7a1e12504e3d4718e56edd0a7e8b5e61a.zip
ES container schema: add 'sim_pubid' and `ia_sim_collection` fields
-rw-r--r--extra/elasticsearch/container_schema.json2
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/extra/elasticsearch/container_schema.json b/extra/elasticsearch/container_schema.json
index 05aa0b35..d3351aab 100644
--- a/extra/elasticsearch/container_schema.json
+++ b/extra/elasticsearch/container_schema.json
@@ -57,6 +57,8 @@
"issns": { "type": "keyword", "normalizer": "default" },
"wikidata_qid": { "type": "keyword", "normalizer": "default" },
"dblp_prefix": { "type": "keyword", "normalizer": "default" },
+ "sim_pubid": { "type": "keyword", "normalizer": "default" },
+ "ia_sim_collection": { "type": "keyword", "normalizer": "default" },
"country_code": { "type": "keyword", "normalizer": "default" },
"region": { "type": "keyword", "normalizer": "default" },
"discipline": { "type": "keyword", "normalizer": "default" },
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py
index ce4308d3..1c7c2905 100644
--- a/python/fatcat_tools/transforms/elasticsearch.py
+++ b/python/fatcat_tools/transforms/elasticsearch.py
@@ -509,6 +509,8 @@ def container_to_elasticsearch(
if extra.get("ia"):
if extra["ia"].get("sim"):
any_ia_sim = True
+ t["sim_pubid"] = extra["ia"]["sim"].get("sim_pubid")
+ t["ia_sim_collection"] = extra["ia"]["sim"].get("collection_item")
if extra["ia"].get("longtail_oa"):
is_longtail_oa = True
t["is_superceded"] = bool(extra.get("superceded"))