aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-01-29 23:56:27 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-01-29 23:56:27 -0800
commitade1eb9ff955ca5ba58acdc8b76e344c9cc54790 (patch)
tree192e6756fe0b4bc83b43323f8e5b47419eb8ed1b /python/fatcat_tools
parent749295a16dd18aa64b87f6b7c3e0e6052931161a (diff)
downloadfatcat-ade1eb9ff955ca5ba58acdc8b76e344c9cc54790.tar.gz
fatcat-ade1eb9ff955ca5ba58acdc8b76e344c9cc54790.zip
fix ES file schema plural field names
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py
index 42669bbf..5a492fb4 100644
--- a/python/fatcat_tools/transforms/elasticsearch.py
+++ b/python/fatcat_tools/transforms/elasticsearch.py
@@ -497,13 +497,12 @@ def file_to_elasticsearch(entity):
sha1 = entity.sha1,
sha256 = entity.sha256,
md5 = entity.md5,
- rel = [u.rel for u in entity.urls],
)
# TODO: domain, hosts (from urls; use proper urlcanon)
- t['rel'] = list(set([u.rel for u in entity.urls]))
- t['host'] = []
- t['domain'] = []
+ t['rels'] = list(set([u.rel for u in entity.urls]))
+ t['hosts'] = []
+ t['domains'] = []
in_ia = False
for u in entity.urls: