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?
Added this to my Class as well
public int[] GetViewSecurityRoles(Guid contentId) { List<int> roleIds = new List<int>(); // Add the Everyone Role roleIds.Add(1); return roleIds.ToArray(); }
Set the Id = ContentId. When adding the roles its looking up by Id vs ContentId.
I am seeing this in my exception log...not sure if it is related
System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.TryParseGuidWithNoStyle(String guidString, GuidResult& result) at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) at System.Guid.Parse(String input) at Telligent.Evolution.Extensibility.Api.Entities.Version1.SearchIndexDocument.get_ContentId() at Telligent.Evolution.Api.Plugins.Search.SearchIndexingPlugin.<>c.<events_AfterBulkIndex>b__9_2(SearchIndexDocument d) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at Telligent.Evolution.Api.Plugins.Search.SearchIndexingPlugin.events_AfterBulkIndex(AfterBulkIndexingEventArgs e) at Telligent.Evolution.Api.Events.SearchIndexingEventExecutor.<>c__DisplayClass11_0.<OnAfterIndex>b__0(AfterSearchBulkIndexingEventHandler h) at Telligent.Evolution.Components.EventsBase.Execute[T](Object eventObject, Action`1 executor, Boolean throwExceptions)
I think I might have found the issue...
Nope...still not getting roles into Solr
Yes, that would be related. This value should really be read-only. Its set in the constructor to the contentId but can be overwritten.
Actually dont set the Id field at all.
I'm not following what to change
Use this constructor SearchIndexDocument(Guid contentId, Guid contentTypeId) (because its sets the Id, UniqueId, ContentId and contentTypeId) and remove the line that sets the Id.There looks to be some legacy cross-crossing of field setting from when Ids were integers and ContentId were not around and using this constructor avoids that.
I did that...content still getting indexed, but no roles still