Disabling highlight causes an internal server error
I use recoll-webui through searx. Since searx implements its own highlighting, the engine passes a parameter to disable the highlighting. However, this is causing the following error (obtained by appending &highlight=0
to the url after using recoll-webui directly):
Error: 500 Internal Server Error
Sorry, the requested URL 'http://localhost:8080/results?query=skolem&dir=%3Call%3E&after=&before=&sort=relevancyrating&ascending=0&page=1&highlight=0' caused an error:
Internal Server Error
Exception:
SystemError("<method 'makedocabstract' of '_recoll.Query' objects> returned a result with an exception set")
Traceback:
AttributeError: 'NoneType' object has no attribute 'endMatch'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/recoll/bottle.py", line 876, in _handle
return route.call(**args)
^^^^^^^^^^^^^^^^^^
File "/opt/recoll/bottle.py", line 1762, in wrapper
rv = callback(*a, **ka)
^^^^^^^^^^^^^^^^^^
File "/opt/recoll/bottle.py", line 3691, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/recoll/webui.py", line 392, in results
res, nres, timer = recoll_search(query)
^^^^^^^^^^^^^^^^^^^^
File "/opt/recoll/webui.py", line 358, in recoll_search
d['snippet'] = query.makedocabstract(doc, methods=highlighter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <method 'makedocabstract' of '_recoll.Query' objects> returned a result with an exception set
The system is Debian sid/unstable. Recoll, python3-waitress and python3-recoll from Debian. Latest master from recoll-webui. It seems the error started to appear after the upgrade to python3.11.