I have a custom ISearchableContentType
I'm wondering once I create new content of that type, how long will it take before it shows up in the search index?
I have a custom ISearchableContentType
I'm wondering once I create new content of that type, how long will it take before it shows up in the search index?
public IList<SearchIndexDocument> GetContentToIndex()
{
List<SearchIndexDocument> documents = new List<SearchIndexDocument>();
var pages = Components.CMSPages.ListPages();
foreach (var page in pages)
{
if (page.IsPublished)
{
SearchIndexDocument doc = new SearchIndexDocument(page.ContentId, Components.CMSPages.CMS_PAGE_CONTENT_TYPE_ID)
{
Content = page.ContentBlob,
Title = page.MetaTitle,
TypeName = "WebContent",
Url = page.Url
};
documents.Add(doc);
}
}
return documents;
}
public string GetViewHtml(IContent content, Target target)
{
var page = Components.CMSPages.Get(content.ContentId);
return page.MetaDescription;
}
public int[] GetViewSecurityRoles(Guid contentId)
{
List<int> roleIds = new List<int>();
// Add the Everyone Role
roleIds.Add(1);
return roleIds.ToArray();
}While I review can you try manually adding a role via the document.IndexFields. The values will be "roles", "1".