diff options
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/search.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py index 121cb69..dccaf07 100644 --- a/fatcat_scholar/search.py +++ b/fatcat_scholar/search.py @@ -377,6 +377,9 @@ def do_fulltext_search( search = search.params(track_total_hits=True) search = search[offset : (offset + limit)] + if settings.ELASTICSEARCH_QUERY_PREFERENCE: + search = search.params(preference=settings.ELASTICSEARCH_QUERY_PREFERENCE) + query_start = datetime.datetime.now() try: resp = search.execute() |