forked from TagesschuleElementa/www.tagesschule-elementa.ch
haystack index path fix
This commit is contained in:
@@ -56,17 +56,18 @@ ALDRYN_SEARCH_INDEX_BASE_CLASS = 'project.search.SearchIndex'
|
||||
|
||||
HAYSTACK_CUSTOM_HIGHLIGHTER = 'project.search.Highlighter'
|
||||
HAYSTACK_DEFAULT_OPERATOR = 'OR'
|
||||
HAYSTACK_INDEX_PATH = os.path.join(DATA_ROOT, 'whoosh', 'index')
|
||||
HAYSTACK_CONNECTIONS = {
|
||||
'default': {
|
||||
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
|
||||
'PATH': os.path.join(BASE_DIR, 'data', 'whoosh', 'index', 'default'),
|
||||
'PATH': os.path.join(HAYSTACK_INDEX_PATH, '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, 'data', 'whoosh', 'index', lang_code),
|
||||
'PATH': os.path.join(HAYSTACK_INDEX_PATH, lang_code),
|
||||
})
|
||||
|
||||
HAYSTACK_ROUTERS = ['aldryn_search.router.LanguageRouter', ]
|
||||
|
||||
Reference in New Issue
Block a user