diff --git a/sapl/settings.py b/sapl/settings.py index f6814440f..5cd22437e 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -84,13 +84,22 @@ INSTALLED_APPS = ( ) + SAPL_APPS +# FTS = Full Text Search +SEARCH_BACKEND = 'haystack.backends.whoosh_backend.WhooshEngine' +SEARCH_URL = ('PATH', PROJECT_DIR.child('whoosh')) + +SOLR_URL = config('SOLR_URL', cast=str, default='') +if SOLR_URL: + SEARCH_BACKEND = 'haystack.backends.solr_backend.SolrEngine' + SEARCH_URL = ('URL', config('SOLR_URL', cast=str)) + # ...or for multicore... + # 'URL': 'http://127.0.0.1:8983/solr/mysite', + HAYSTACK_CONNECTIONS = { 'default': { - 'ENGINE': 'haystack.backends.solr_backend.SolrEngine', - 'URL': config('SOLR_URL', cast=str) - # ...or for multicore... - # 'URL': 'http://127.0.0.1:8983/solr/mysite', + 'ENGINE': SEARCH_BACKEND, + SEARCH_URL[0] : SEARCH_URL[1] }, }