You can tell Kentico to update the search index value for a specific document via the SearchTaskAzureInfoProvider.SetSearchTaskAzureInfo
method.
Here's an example call:
SearchTaskAzureInfoProvider.SetSearchTaskAzureInfo(new SearchTaskAzureInfo
{
SearchTaskAzureType = SearchTaskTypeEnum.Update,
SearchTaskAzureObjectType = TreeNode.OBJECT_TYPE,
SearchTaskAzureInitiatorObjectID = document.DocumentID,
// From Kentico source TreeNode.cs -> GetSearchID()
SearchTaskAzureAdditionalData = $"{document.DocumentID};{document.NodeID}",
SearchTaskAzureMetadata = SearchFieldsConstants.ID,
});
We use this to request index updates when related table columns are changed and the search index pulls data from those related tables for indexed documents.
This call will create an Azure Search task which will call your custom Azure Search module for the document specified.