Skip to content
Snippets Groups Projects
Verified Commit 61636a40 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Use whoosh as default index

parent bf42feb5
No related branches found
No related tags found
1 merge request!591Resolve "Rely on object permissions for search index"
Pipeline #11883 passed
......@@ -65,7 +65,6 @@ docs/_build/
aleksis/node_modules/
aleksis/static/
aleksis/whoosh_index/
aleksis/xapian_index/
.coverage
.mypy_cache/
......
......@@ -757,23 +757,11 @@ SILENCED_SYSTEM_CHECKS.append("guardian.W001")
# Append authentication backends
AUTHENTICATION_BACKENDS.append("rules.permissions.ObjectPermissionBackend")
HAYSTACK_BACKEND_SHORT = _settings.get("search.backend", "whoosh")
HAYSTACK_BACKEND_SHORT = "whoosh"
if HAYSTACK_BACKEND_SHORT == "simple":
HAYSTACK_CONNECTIONS = {
"default": {"ENGINE": "haystack.backends.simple_backend.SimpleEngine",},
}
elif HAYSTACK_BACKEND_SHORT == "xapian":
HAYSTACK_CONNECTIONS = {
"default": {
"ENGINE": "xapian_backend.XapianEngine",
"PATH": _settings.get("search.index", os.path.join(BASE_DIR, "xapian_index")),
},
}
elif HAYSTACK_BACKEND_SHORT == "whoosh":
HAYSTACK_CONNECTIONS = {
"default": {"ENGINE": "haystack_redis.RedisEngine", "PATH": REDIS_URL,},
}
HAYSTACK_CONNECTIONS = {
"default": {"ENGINE": "haystack_redis.RedisEngine", "PATH": REDIS_URL,},
}
HAYSTACK_SIGNAL_PROCESSOR = "celery_haystack.signals.CelerySignalProcessor"
CELERY_HAYSTACK_IGNORE_RESULT = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment