From df2c90e488ba3ae28b4779543dca6f0dc89f3ff2 Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Thu, 1 Oct 2020 10:16:08 +0200 Subject: [PATCH] For published content index items by getting children recursively --- src/Umbraco.Examine/ContentIndexPopulator.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Examine/ContentIndexPopulator.cs b/src/Umbraco.Examine/ContentIndexPopulator.cs index 7f712c48e2..54c872d550 100644 --- a/src/Umbraco.Examine/ContentIndexPopulator.cs +++ b/src/Umbraco.Examine/ContentIndexPopulator.cs @@ -109,14 +109,20 @@ namespace Umbraco.Examine { //add the published filter //note: We will filter for published variants in the validator - content = _contentService.GetPagedDescendants(contentParentId, pageIndex, pageSize, out _, - _publishedQuery, Ordering.By("Path", Direction.Ascending)).ToArray(); - + content = _contentService.GetPagedChildren(contentParentId, pageIndex, pageSize, out _, _publishedQuery, + Ordering.By("Path", Direction.Ascending)).ToArray(); + if (content.Length > 0) { // ReSharper disable once PossibleMultipleEnumeration foreach (var index in indexes) index.IndexItems(_contentValueSetBuilder.GetValueSets(content)); + + + foreach (var c in content) + { + IndexPublishedContent(c.Id,0, 10000, indexes); + } } pageIndex++;