aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/search.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-25 17:13:14 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-25 17:13:14 -0800
commit5aed3803affdb3f05b881cb90496180be45da440 (patch)
tree5a4de19de020ad063f5f85219ad24851ed7373c7 /fatcat_scholar/search.py
parent3340910073bca6483937ed6d9e5f5b5942833c2e (diff)
downloadfatcat-scholar-5aed3803affdb3f05b881cb90496180be45da440.tar.gz
fatcat-scholar-5aed3803affdb3f05b881cb90496180be45da440.zip
refactor ES configuration setting names
Diffstat (limited to 'fatcat_scholar/search.py')
-rw-r--r--fatcat_scholar/search.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py
index 600745f..c75ccdb 100644
--- a/fatcat_scholar/search.py
+++ b/fatcat_scholar/search.py
@@ -97,7 +97,7 @@ class FulltextHits(BaseModel):
# global sync client connection
-es_client = elasticsearch.Elasticsearch(settings.ELASTICSEARCH_BACKEND, timeout=25.0)
+es_client = elasticsearch.Elasticsearch(settings.ELASTICSEARCH_QUERY_BASE, timeout=25.0)
def transform_es_results(resp: Response) -> List[dict]:
@@ -281,7 +281,7 @@ def do_fulltext_search(
query: FulltextQuery, deep_page_limit: int = 2000
) -> FulltextHits:
- search = Search(using=es_client, index=settings.ELASTICSEARCH_FULLTEXT_INDEX)
+ search = Search(using=es_client, index=settings.ELASTICSEARCH_QUERY_FULLTEXT_INDEX)
if query.collapse_key:
search = search.filter("term", collapse_key=query.collapse_key)