From d842983d55fd13b4a006a3caa384e68c70ce998c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 8 Apr 2020 11:47:33 -0700 Subject: ingest: configurable ES index --- python/fatcat_ingest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/fatcat_ingest.py b/python/fatcat_ingest.py index c6f27ad3..68676ad2 100755 --- a/python/fatcat_ingest.py +++ b/python/fatcat_ingest.py @@ -27,7 +27,7 @@ def _init_search(args): args.api.get_changelog() client = elasticsearch.Elasticsearch(args.elasticsearch_endpoint) - search = Search(using=client, index="fatcat_release") + search = Search(using=client, index=args.elasticsearch_index) return search @@ -186,6 +186,9 @@ def main(): parser.add_argument('--elasticsearch-endpoint', default="https://search.fatcat.wiki", help="elasticsearch API. internal endpoint preferred, but public is default") + parser.add_argument('--elasticsearch-index', + default="fatcat_release", + help="elasticsearch index to query") parser.add_argument('--env', default="dev", help="Kafka topic namespace to use (eg, prod, qa, dev)") -- cgit v1.2.3