This command helps to get deleted KB records back, I can find my test strings from attached PDFs in Zammad again:
zammad run rails r ‘p KnowledgeBase::Answer::Translation.search_index_reload’
As only attachments are affected I tried to reinstall the elasticsearch-plugin ingest-attachment.
This worked fine too, but didn’t change the behavior.
Does anyone have an idea why some elasticsearch records get deleted over time?
Or am I on the wrong trace and missing something else here?
That cronjob is the shittiest “solution” I’ve seen in a while. No offense.
Also it affects the complete searchindex not just your knowledgebase which seems to be affected in your case.
I’ve searched for a fairly old attachment name in our support instance (ticket context) and couldn’t find it as well. I then checked a not so old (2 weeks) attachment, same context, same issue.
Interestingly, on my 5.1 and 5.2 test installations with default setup the attachments are not indexed at all. What catched my eye here, index wise, was this in the doc of an relevant ticket entry