Thank You @shanebp for your response. I will look at the specific file mentioned. My requirement is not just limited to the forum actions. I would like to know the function that is called to save an activity event into the activity stream. I thought it was bp_activity_add() but looks like all actions do not use this.
The above solution did not work. Including ‘bp_doc’ as a post type in the $query object did not make a difference in the search as ‘bp_doc’ does not exist as a post type. Tried to create custom post type ‘bp_doc’ but couldn’t figure out a way to link the post type to the document list.
Thank you for your response. I am currently working with the code solution you provided. For some reason, the query->set is not updating the post_type attribute of the Query Object. Still debugging this. Will update soon. Thank You