Fixing ContentItem.ContentType indexing so it can be queried by search

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-03-28 22:13:25 -07:00
parent d0af08fce9
commit f2586d06d2
5 changed files with 50 additions and 8 deletions

View File

@@ -49,8 +49,8 @@ namespace Orchard.Core.Common.Handlers {
OnPublishing<ContentPart<CommonPartVersionRecord>>(AssignPublishingDates);
OnIndexing<CommonPart>((context, commonPart) => context.DocumentIndex
.Add("type", commonPart.ContentItem.ContentType).Store()
.Add("author", commonPart.Owner.UserName).Store()
.Add("type", commonPart.ContentItem.ContentType).Analyze().Store()
.Add("author", commonPart.Owner.UserName).Analyze().Store()
.Add("created", commonPart.CreatedUtc ?? _clock.UtcNow).Store()
.Add("published", commonPart.PublishedUtc ?? _clock.UtcNow).Store()
.Add("modified", commonPart.ModifiedUtc ?? _clock.UtcNow).Store()