Gravatar for

Question by robertobarbedo, Mar 4, 2015 9:01 AM

Add a field in coveoPostItemProcessingPipeline


I am working with Coveo for Sitecore and I am trying to add a custom field using a process in the coveoPostItemProcessingPipeline.

I added the processor to clone a item and it is working well. Now I am trying to add fields to the cloned item and I am probably missing something here.


CoveoIndexableItem clone = Clone(args.CoveoItem);

clone.UniqueId += "vp1";
clone.Title += " CLONE";

clone.Metadata.Add("ClonedOnIndexing", "YES");


I also added the field in the fieldMap: First in the AddFieldByName

< fieldType fieldName="clonedonindexing" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" / >

Then in the External Fields

< externalFields hint="raw:AddExternalField" >
  < field fieldName="clonedonindexing" / >
< /externalFields >

Also I did try both settings together. I did run a complete reindex from control panel.

Is there anything else I am missing. Any help is very welcome..


1 Reply
Gravatar for

Answer by Vincent Séguin, Mar 4, 2015 9:10 AM

Hi Roberto,

You can't add a field this way. The fields in the fieldMap are not intended to be added if they don't exist in Sitecore. You would need to create a computed field for what you are trying to achieve.

Thank you.

Gravatar for

Comment by robertobarbedo, Mar 4, 2015 9:38 AM

Thanks Vicent. Really appreciate. I believe I can manage ComputedFields to get the results I expect.

Gravatar for

Comment by robertobarbedo, Mar 4, 2015 9:41 AM

Only in addition, I went by this path because of the comment "Adding Fields" in the coveoPostItemProcessingPipeline section at this page: My understand is that suggest we can do it.

Ask a question