summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-05-14 23:11:51 -0700
committerBryan Newbold <bnewbold@archive.org>2020-05-14 23:11:51 -0700
commitc177c08c49818b0653f3c57f2ddad9af8f9ab0d0 (patch)
tree4b6d76d06684b2f454d631f2f62d42da9d9efb6e
parent3346a8d61c40e3f18b26c13df9dfafc2a0ad8e80 (diff)
downloadfatcat-scholar-c177c08c49818b0653f3c57f2ddad9af8f9ab0d0.tar.gz
fatcat-scholar-c177c08c49818b0653f3c57f2ddad9af8f9ab0d0.zip
ES index and makefile target
-rw-r--r--Makefile8
-rw-r--r--settings.toml11
2 files changed, 18 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 08fd07d..7e6d820 100644
--- a/Makefile
+++ b/Makefile
@@ -20,3 +20,11 @@ dev: ## Run web service locally, with reloading
.PHONY: run
run: ## Run web service under gunicorn
pipenv run gunicorn fatcat_scholar.web:app -w 4 -k uvicorn.workers.UvicornWorker
+
+.PHONY: reset-index-dev
+reset-index-dev: ## Delete/Create DEV elasticsearch fulltext index locally
+ http delete :9200/dev_scholar_fulltext_v01 && true
+ http put ":9200/qa_scholar_fulltext_v01?include_type_name=false" < schema/scholar_fulltext.v01.json
+ http delete :9200/dev_scholar_fulltext && true
+ http put :9200/dev_scholar_fulltext_v01/_alias/dev_scholar_fulltext
+
diff --git a/settings.toml b/settings.toml
index de57a4e..3769f85 100644
--- a/settings.toml
+++ b/settings.toml
@@ -3,5 +3,14 @@
FATCAT_DOMAIN = "fatcat.wiki"
I18N_LANG_DEFAULT = "en"
ELASTICSEARCH_BACKEND = "https://search.fatcat.wiki"
-ELASTICSEARCH_FULLTEXT_INDEX = "covid19_fatcat_fulltext"
+ELASTICSEARCH_FULLTEXT_INDEX = "scholar_fulltext"
COVID19_FULLTEXT_HOST = "https://covid19.fatcat.wiki"
+
+[dev]
+ELASTICSEARCH_FULLTEXT_INDEX = "dev_scholar_fulltext"
+
+[qa]
+ELASTICSEARCH_FULLTEXT_INDEX = "qa_scholar_fulltext"
+
+[production]
+ELASTICSEARCH_FULLTEXT_INDEX = "scholar_fulltext"