|
|
|
|
@ -59,15 +59,15 @@ HAYSTACK_CUSTOM_HIGHLIGHTER = 'project.search.Highlighter'
|
|
|
|
|
HAYSTACK_DEFAULT_OPERATOR = 'OR'
|
|
|
|
|
HAYSTACK_CONNECTIONS = {
|
|
|
|
|
'default': {
|
|
|
|
|
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
|
|
|
|
|
'URL': 'http://localhost:8983/solr/de/',
|
|
|
|
|
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
|
|
|
|
|
'PATH': os.path.join(os.path.dirname(__file__), 'data', 'whoosh', 'default'),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
for lang_code, lang in LANGUAGES:
|
|
|
|
|
HAYSTACK_CONNECTIONS[lang_code] = {}
|
|
|
|
|
HAYSTACK_CONNECTIONS[lang_code].update({
|
|
|
|
|
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
|
|
|
|
|
'URL': 'http://localhost:8983/solr/{}'.format(lang_code),
|
|
|
|
|
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
|
|
|
|
|
'PATH': os.path.join(os.path.dirname(__file__), 'data', 'whoosh', lang_code),
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
HAYSTACK_ROUTERS = ['aldryn_search.router.LanguageRouter', ]
|
|
|
|
|
|