aboutsummaryrefslogtreecommitdiffstats
path: root/extra/elasticsearch
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-01-29 16:00:03 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-01-29 21:59:05 -0800
commit901cf998ce7d8f896cf5d609719b1defd96d01d4 (patch)
tree85a5eebe76e8ca4df3b1b4217ecc9e829f50583c /extra/elasticsearch
parent55a4f211532c93d8164b0d4719dc0413005941ea (diff)
downloadfatcat-901cf998ce7d8f896cf5d609719b1defd96d01d4.tar.gz
fatcat-901cf998ce7d8f896cf5d609719b1defd96d01d4.zip
first implementation of ES file schema
Includes a trivial test and transform, but not any workers or doc updates.
Diffstat (limited to 'extra/elasticsearch')
-rw-r--r--extra/elasticsearch/file_schema.json46
1 files changed, 46 insertions, 0 deletions
diff --git a/extra/elasticsearch/file_schema.json b/extra/elasticsearch/file_schema.json
new file mode 100644
index 00000000..66d81e0b
--- /dev/null
+++ b/extra/elasticsearch/file_schema.json
@@ -0,0 +1,46 @@
+{
+"settings": {
+ "index": {
+ "analysis": {
+ "analyzer": {
+ "default": {
+ "type": "custom",
+ "tokenizer": "standard",
+ "filter": [ "lowercase", "asciifolding" ]
+ }
+ }
+ }
+ }
+},
+"mappings": {
+ "changelog": {
+ "properties": {
+ "ident": { "type": "keyword", "doc_values": false },
+ "state": { "type": "keyword" },
+ "revision": { "type": "keyword", "doc_values": false },
+
+ "release_ids": { "type": "keyword", "doc_values": false },
+ "release_count": { "type": "integer" },
+ "mimetype": { "type": "keyword" },
+ "size_bytes": { "type": "integer" },
+ "sha1": { "type": "keyword", "doc_values": false },
+ "sha256": { "type": "keyword", "doc_values": false },
+ "md5": { "type": "keyword", "doc_values": false },
+
+ "domains": { "type": "keyword" },
+ "hosts": { "type": "keyword" },
+ "rels": { "type": "keyword" },
+ "in_ia": { "type": "boolean" },
+
+ "release_id": { "type": "alias", "path": "release_ids" },
+ "sha1hex": { "type": "alias", "path": "sha1hex" },
+ "sha256hex": { "type": "alias", "path": "sha256hex" },
+ "md5hex": { "type": "alias", "path": "md5hex" },
+ "size": { "type": "alias", "path": "size_bytes" },
+ "domain": { "type": "alias", "path": "domains" },
+ "host": { "type": "alias", "path": "host" },
+ "rel": { "type": "alias", "path": "rel" }
+ }
+ }
+}
+}