From 6aafba52d7a3f6f03b85d9df35972eb6564d36ed Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Wed, 6 Oct 2021 21:48:53 +0200 Subject: Create indexes when creating database, also make it possible to search based on indexes. --- src/index.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/index.py (limited to 'src/index.py') diff --git a/src/index.py b/src/index.py new file mode 100644 index 0000000..7933824 --- /dev/null +++ b/src/index.py @@ -0,0 +1,47 @@ +indexes = [ + { + "index": { + "fields": [ + "domain" + ] + }, + "name": "domain-json-index", + "type": "json" + }, + { + "index": { + "fields": [ + "ip" + ] + }, + "name": "ip-json-index", + "type": "json" + }, + { + "index": { + "fields": [ + "port" + ] + }, + "name": "port-json-index", + "type": "json" + }, + { + "index": { + "fields": [ + "asn" + ] + }, + "name": "asn-json-index", + "type": "json" + }, + { + "index": { + "fields": [ + "asn_country_code" + ] + }, + "name": "asn-country-code-json-index", + "type": "json" + } +] -- cgit v1.1