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"); args.OutputCoveoItems.Add(clone);
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..
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.