From 5aed3803affdb3f05b881cb90496180be45da440 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 25 Jan 2021 17:13:14 -0800 Subject: refactor ES configuration setting names --- fatcat_scholar/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fatcat_scholar/search.py') 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) -- cgit v1.2.3