haystack search multilang

standalone
Simon Caminada 8 years ago
parent 534e83143f
commit b566e7b1a5

@ -54,9 +54,15 @@ HAYSTACK_DEFAULT_OPERATOR = 'OR'
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', 'de'),
'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', 'default'),
},
}
for lang_code, lang in LANGUAGES:
HAYSTACK_CONNECTIONS[lang_code] = {}
HAYSTACK_CONNECTIONS[lang_code].update({
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, 'whoosh', 'index', lang_code),
})
HAYSTACK_ROUTERS = ['aldryn_search.router.LanguageRouter', ]

Loading…
Cancel
Save