I have a Sitecore 8.1 instance running with WeBlog and I want to be able to retrieve the Entry Date
fields from Lucene. The Entry Date
field is a Date Field
.
My custom search result item class is defined like this:
public class BlogEntry: SearchResultItem
{
[IndexField("entrydate")]
public DateTime EntryDate { get; set; }
}
After reindexing the field is never populated with the right value when I run the query. Also, I have not created any custom index, I’m using the sitecore_web_index
.
This is what my query looks like:
IQueryable<BlogEntry> searchQuery = searchcontext.GetQueryable<BlogEntry>()
.Where(c => c.TemplateId == new ID("{5FA92FF4-4AC2-48E2-92EB-E1E4914677B0}")
&& c.Path.Contains(DateTime.Now.Year.ToString())
&& c[BuiltinFields.LatestVersion] == "1"
&& c.Language == Sitecore.Context.Language.CultureInfo.TwoLetterISOLanguageName)
Any thoughts on what I need to change to have this field start populating with its value?