• Not Answered

How do I use a the contentSearch.cleanUp pipeline processor to modify an Item to be indexed?

I've created a new index to store a set of my business entities, Appointments. Appointments represent meetings between more than one Person at a Venue. Person and Venue are also business entities in my application.

My Appointment item has a reference to a Venue and a list of Persons.

When I index Appointments, these references are stored in the Appointment documents as guid strings. I want to modify these documents to contain some details about Persons and Venues, the name of each Person and the address of the Venue.

I found what I think might be a appropriate pipeline in \App_Config\Include\Sitecore.ContentSearch.config, the contentSearch.cleanUp pipeline. The comments say this pipeling is used to update/merge the item before it is indexed. I can't seem to figure out though how to use the CleanUpProcessor API (processors in the contentSearch.cleanUp must be CleanUpProcessors) to add the Person and Venue data to my document before it is indexed.

I have gotten as far as accessing the IIndexable from the CleanUpArgs and extracting the guids for the Persons and Venue and fetch the relevant data for these related objects.

How do I use this processor to update the document to be indexed? 

Can you give me some pointers on how to use this api to modify my documents before they are indexed? Or maybe there is a more appropriate way to achieve this that you will suggest?