From e51c95a28f87bcd23f58bafef7ed373e39cf8be6 Mon Sep 17 00:00:00 2001 From: Samuel Walladge Date: Wed, 20 Nov 2019 12:04:51 +1030 Subject: [PATCH] Allow overriding SEARCH_FILTER_GENERATOR This allows setting a path to a custom python module/plugin for search. For example, if one wishes to filter out certain results. --- lms/envs/production.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/envs/production.py b/lms/envs/production.py index 0b9d41c363..01fc539e5a 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -805,6 +805,7 @@ if FEATURES.get('ENABLE_COURSEWARE_SEARCH') or \ FEATURES.get('ENABLE_TEAMS'): # Use ElasticSearch as the search engine herein SEARCH_ENGINE = "search.elastic.ElasticSearchEngine" + SEARCH_FILTER_GENERATOR = ENV_TOKENS.get('SEARCH_FILTER_GENERATOR', SEARCH_FILTER_GENERATOR) ELASTIC_SEARCH_CONFIG = ENV_TOKENS.get('ELASTIC_SEARCH_CONFIG', [{}])