Op 18 jan 2024, om 12:17 heeft Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> het volgende geschreven:
Marco van Tol writes:
(Sorry for the top-quote)
Awwwwww....
Here I was hoping for a success report! ;-)
Heh, sorry :)
It took me a while to find time to try it, but I have just now.
I realize I might just need to be patient to wait for the next cron iteration, but here’s what I currently see happening.
I use containers based on those made by maxking, which luckily already install xapian.
So in settings.py I changed what was there to what was suggested by the documentation pointed to by Odhiambo, adapted for the paths the container can use:
HAYSTACK_CONNECTIONS = { 'default': { 'PATH': "/opt/mailman-web-data/xapian_index", 'ENGINE': 'xapian_backend.XapianEngine' }, }
When I restart the container the path gets mkdir’ed, but nothing appears in it, and searches give an error.
The logs have this key error message:
ERROR 2024-01-22 15:27:34,540 25 django.request Internal Server Error: /hyperkitty/search Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/xapian_backend.py", line 1170, in _database database = xapian.Database(self.path) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/xapian/__init__.py", line 3665, in __init__ _xapian.Database_swiginit(self, _xapian.new_Database(*args)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ xapian.DatabaseNotFoundError: Couldn't detect type of database
During handling of the above exception, another exception occurred:
[...]
File "/usr/lib/python3.11/site-packages/xapian_backend.py", line 1172, in _database raise InvalidIndexError('Unable to open index at %s' % self.path) xapian_backend.InvalidIndexError: Unable to open index at /opt/mailman-web-data/xapian_index
I’ll dig a bit further to see if I can fix this, but figured I sort of owed you an update :-)
Marco van Tol