This article contains a sample that explicitly will exclude expired content in Episerver Search results.
private bool IsPublished(IVersionable content)
{
if (content == null)
return true;
if (content.StopPublish > DateTime.UtcNow)
return content.Status.HasFlag(VersionStatus.Published);
return false;
}
Please sign in to leave a comment.