I am adding the Item created field to Solr index. This is the code
public override object ComposeValue(object source, ConcurrentDictionary<string, object> context)
{
if (context == null || source == null || !(source is CatalogItemBase entity))
{
return null;
}
return entity.DateCreated;
}
I have tried DateCreated
but this is not giving the correct value. I want to use the _Created
Sitecore field which records the item created date. Is there any way I can read the item and get the item created date which is _Created
field?