mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#18907: Optimizing Search content picker
Work Item: 18907 --HG-- branch : 1.x
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Orchard.Search.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var list = Services.New.List();
|
var list = Services.New.List();
|
||||||
foreach (var contentItem in searchHits.Select(searchHit => Services.ContentManager.Get(searchHit.ContentItemId))) {
|
foreach (var contentItem in Services.ContentManager.GetMany<IContent>(searchHits.Select(x => x.ContentItemId), VersionOptions.Published, QueryHints.Empty)) {
|
||||||
// ignore search results which content item has been removed or unpublished
|
// ignore search results which content item has been removed or unpublished
|
||||||
if (contentItem == null) {
|
if (contentItem == null) {
|
||||||
searchHits.TotalItemCount--;
|
searchHits.TotalItemCount--;
|
||||||
|
|||||||
Reference in New Issue
Block a user