I am unable to use search. I get the error below from the UI
search backend error. Verify that the search service is available and that the search syntax is valid for the active search backend; ord() expected a character, but string of length 0 found
error recorded on mayan docker image logs
[2024-01-21 11:00:11,467: ERROR/ForkPoolWorker-4] Unexpected error calling `task_index_instance` with keyword arguments {'app_label': 'documents', 'model_name': 'documentfile', 'object_id': 520732, 'exclude_app_label': None, 'exclude_model_name': None, 'exclude_kwargs': None}.
[2024-01-21 11:00:11,469: ERROR/ForkPoolWorker-4] Task mayan.apps.dynamic_search.tasks.task_index_instance[d51597b4-c2fd-4eb8-9fca-629ba6960f9f] raised unexpected: DynamicSearchException("Unexpected error calling `task_index_instance` with keyword arguments {'app_label': 'documents', 'model_name': 'documentfile', 'object_id': 520732, 'exclude_app_label': None, 'exclude_model_name': None, 'exclude_kwargs': None}.")
Traceback (most recent call last):
File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/dynamic_search/tasks.py", line 67, in task_index_instance
SearchBackend.get_instance().index_instance(
File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/dynamic_search/backends/whoosh.py", line 402, in index_instance
with self._get_writer(search_model=search_model) as writer:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/dynamic_search/backends/whoosh.py", line 277, in _get_writer
index = self._get_or_create_index(search_model=search_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/dynamic_search/backends/whoosh.py", line 231, in _get_or_create_index
index = storage.open_index(
^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/whoosh/filedb/filestore.py", line 176, in open_index
return indexclass(self, schema=schema, indexname=indexname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/whoosh/index.py", line 421, in __init__
TOC.read(self.storage, self.indexname, schema=self._schema)
File "/opt/mayan-edms/lib/python3.11/site-packages/whoosh/index.py", line 632, in read
check_size("int", _INT_SIZE)
File "/opt/mayan-edms/lib/python3.11/site-packages/whoosh/index.py", line 626, in check_size
sz = stream.read_varint()
^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/whoosh/filedb/structfile.py", line 191, in read_varint
return read_varint(self.read)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/whoosh/util/varints.py", line 102, in read_varint
b = ord(readfn(1))
^^^^^^^^^^^^^^
TypeError: ord() expected a character, but string of length 0 found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/mayan-edms/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mayan-edms/lib/python3.11/site-packages/mayan/apps/dynamic_search/tasks.py", line 88, in task_index_instance
raise DynamicSearchException(error_message) from exception
mayan.apps.dynamic_search.exceptions.DynamicSearchException: Unexpected error calling `task_index_instance` with keyword arguments {'app_label': 'documents', 'model_name': 'documentfile', 'object_id': 520732, 'exclude_app_label': None, 'exclude_model_name': None, 'exclude_kwargs': None}
looking up the api routes and search is null? is this normal? I dont think i disabled search.
GET /api/v4/?page=3
RESPONSE
{
"label": "search",
"url": null
},
Api Search
get: Perform a search operation.
GET /api/v4/search/documents.documentsearchresult/?q=821e9975-5b71-4376-ac19-746ba4beca2a
RESPONSE
**HTTP 200 OK**
**Allow:** GET, HEAD, OPTIONS
**Content-Type:** application/json
**Vary:** Accept
{
"count": 0,
"next": null,
"previous": null,
"results": []
}
is there anything i could do to resolve this