Do a distinct on user ids before building index, to avoid issue with more than 2100 parameters

This commit is contained in:
Bjarke Berg
2024-04-23 11:03:42 +02:00
parent 5c16cfb947
commit 07431e092b

View File

@@ -128,9 +128,9 @@ public class ContentValueSetBuilder : BaseValueSetBuilder<IContent>, IContentVal
// processing below instead of one by one.
using (ICoreScope scope = _scopeProvider.CreateCoreScope())
{
creatorIds = _userService.GetProfilesById(content.Select(x => x.CreatorId).ToArray())
creatorIds = _userService.GetProfilesById(content.Select(x => x.CreatorId).Distinct().ToArray())
.ToDictionary(x => x.Id, x => x);
writerIds = _userService.GetProfilesById(content.Select(x => x.WriterId).ToArray())
writerIds = _userService.GetProfilesById(content.Select(x => x.WriterId).Distinct().ToArray())
.ToDictionary(x => x.Id, x => x);
scope.Complete();
}