From 09a1829a10caf9759762b41c36169c0b88cd5ed7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 17 Nov 2021 16:36:16 -0800 Subject: content_scope: include in file ES schema and transform --- extra/elasticsearch/file_schema.json | 1 + python/fatcat_tools/transforms/elasticsearch.py | 1 + 2 files changed, 2 insertions(+) diff --git a/extra/elasticsearch/file_schema.json b/extra/elasticsearch/file_schema.json index a8dbc6d0..34e2b0b3 100644 --- a/extra/elasticsearch/file_schema.json +++ b/extra/elasticsearch/file_schema.json @@ -37,6 +37,7 @@ "release_ids": { "type": "keyword", "normalizer": "default", "doc_values": false }, "release_count": { "type": "integer" }, "mimetype": { "type": "keyword", "normalizer": "default" }, + "content_scope": { "type": "keyword", "normalizer": "default" }, "size_bytes": { "type": "integer" }, "sha1": { "type": "keyword", "normalizer": "default", "doc_values": false }, "sha256": { "type": "keyword", "normalizer": "default", "doc_values": false }, diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py index d4962205..c16053ec 100644 --- a/python/fatcat_tools/transforms/elasticsearch.py +++ b/python/fatcat_tools/transforms/elasticsearch.py @@ -650,6 +650,7 @@ def file_to_elasticsearch(entity: FileEntity) -> Dict[str, Any]: release_ids=entity.release_ids, release_count=len(entity.release_ids), mimetype=entity.mimetype, + content_scope=entity.content_scope, size_bytes=entity.size, sha1=entity.sha1, sha256=entity.sha256, -- cgit v1.2.3