When searching for attachments, I am trying to develop an addon to parse files that cannot be searched.

I’m trying to create an addon that helps Atlassian parse the contents of attached files when indexing for search. To do that, I think I need to intervene when the attached file is indexed and throw the contents of the attached file to the indexing system. Is there an API that can be used in that case?