Facet on Custom Computed Date Time Field
Hi There, I followed steps below on creating an Archive Date Time Field https://developers.coveo.com/display/public/SitecoreV3/Creating+a+Computed+Date+Field
All is fine, I see the field on my index browser and was able to output it on to the UI using ToCoveoFieldName helper as well.
I am trying to Facet on this field, either the facet based on the field is not available on the dropdown or if it is, then no values coming up. Am I missing something? Is there is a specific field I will need to map the facet to?
- Coveo For Sitecore - September components
- Sitecore - 8.1 Update 2
Config Entry - For Computed Field
<field fieldName="archivedDate">zhsbs.ArchivedDateField, namespace.project</field>
Field Map to make it facettable
<fieldMap type="Coveo.SearchProvider.CoveoFieldMap, Coveo.SearchProvider"> <fieldNames hint="raw:AddFieldByFieldName"> <fieldType fieldName="archivedDate" isFacet="true" isMultiValue="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" /> </fieldNames> </fieldMap>
I think I am doing everything right, could be I am missing something to make this facettable? It would help if there is a sample on how to make a computed datetime field facettable.
Thanks to @jflheureux
A standard facet can never be applied to Datetime field. :) Which is why when I do the above , the dropdown does not contain the datetime computed field.
Hi @Dipsindol :)
The fields visible in the dropdown are defined in the items placed in the "Facets" bucket, located under the "
You should add an item in this bucket matching the new computed field you added in your configuration.
These steps can be found in our documentation here.