From 07431e092be908b8933646db6b26cdfcfc11ffa3 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Tue, 23 Apr 2024 11:03:42 +0200 Subject: [PATCH] Do a distinct on user ids before building index, to avoid issue with more than 2100 parameters --- src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs index 860c6199f7..98c28f92df 100644 --- a/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs @@ -128,9 +128,9 @@ public class ContentValueSetBuilder : BaseValueSetBuilder, 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(); }