I am trying return an array from a computed field index. I have implemented the IComputedIndexField and am returning a List of type string but have not specified anything for the ReturnType
property.
Answer by Jean-François L'Heureux · Dec 17, 2015 at 05:20 PM
Hi,
Coveo Enterprise Search doesn't have an array field type. It supports only string, numeric, date/time and floating point. However you can have a string field with multiple values if it is set as a multi-value facet field.
If you don't define the ReturnType
property of a computed index field, it will be string by default I think.
If you return a collection in the ComputeFieldValue
method of a computed index field, it will index the value as a semi-colon separated list of values (e.g.: "value1;value2").
In Coveo for Sitecore, you can configure a field to be a multi-value facet field in the Coveo.SearchProvider.config
file (see Making a Sitecore field multi-value).
I hope this helps,
Jeff