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.
This commit is contained in:
Samuel Walladge
2019-11-20 12:04:51 +10:30
parent 1abad23d4a
commit e51c95a28f

View File

@@ -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', [{}])