mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adding the container id of an item to the index
This commit is contained in:
@@ -55,7 +55,13 @@ namespace Orchard.Core.Common.Handlers {
|
||||
.Add("published", commonPart.PublishedUtc ?? _clock.UtcNow).Store()
|
||||
.Add("modified", commonPart.ModifiedUtc ?? _clock.UtcNow).Store();
|
||||
|
||||
if (commonPart.Owner != null) context.DocumentIndex.Add("author", commonPart.Owner.UserName).Analyze().Store();
|
||||
if (commonPart.Container != null) {
|
||||
context.DocumentIndex.Add("container-id", commonPart.Container.Id).Store();
|
||||
}
|
||||
|
||||
if (commonPart.Owner != null) {
|
||||
context.DocumentIndex.Add("author", commonPart.Owner.UserName).Analyze().Store();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user