(from https://github.com/tpwd/ke_search/issues/233#issuecomment-2217600552) The method IndexerBase->addTagsToRecords should be refactored though, the database queries are difficult to understand and susceptible to serious security vulnerabilities if the method arguments have not been carefully checked and cleaned up. This should happen within the method.
The method uses QueryBuilder->add() which is not available in TYPO3 13 anymore.