示例#1
0
        public override PutMappingDescriptor <Stack> BuildMapping(PutMappingDescriptor <Stack> map)
        {
            const string SET_FIXED_SCRIPT = @"ctx._source['fixed'] = !!ctx._source['date_fixed']";

            return(map
                   .Type(Name)
                   .Dynamic(DynamicMappingOption.Ignore)
                   .Transform(t => t.Script(SET_FIXED_SCRIPT).Language(ScriptLang.Groovy))
                   .IncludeInAll(false)
                   .Properties(p => p
                               .SetupDefaults()
                               .String(f => f.Name(s => s.OrganizationId).IndexName(Fields.OrganizationId).Index(FieldIndexOption.NotAnalyzed))
                               .String(f => f.Name(s => s.ProjectId).IndexName(Fields.ProjectId).Index(FieldIndexOption.NotAnalyzed))
                               .String(f => f.Name(s => s.SignatureHash).IndexName(Fields.SignatureHash).Index(FieldIndexOption.NotAnalyzed))
                               .String(f => f.Name(e => e.Type).IndexName(Fields.Type).Index(FieldIndexOption.NotAnalyzed))
                               .Date(f => f.Name(s => s.FirstOccurrence).IndexName(Fields.FirstOccurrence))
                               .Date(f => f.Name(s => s.LastOccurrence).IndexName(Fields.LastOccurrence))
                               .String(f => f.Name(s => s.Title).IndexName(Fields.Title).Index(FieldIndexOption.Analyzed).IncludeInAll().Boost(1.1))
                               .String(f => f.Name(s => s.Description).IndexName(Fields.Description).Index(FieldIndexOption.Analyzed).IncludeInAll())
                               .String(f => f.Name(s => s.Tags).IndexName(Fields.Tags).Index(FieldIndexOption.Analyzed).IncludeInAll().Boost(1.2))
                               .String(f => f.Name(s => s.References).IndexName(Fields.References).Index(FieldIndexOption.Analyzed).IncludeInAll())
                               .Date(f => f.Name(s => s.DateFixed).IndexName(Fields.DateFixed))
                               .Boolean(f => f.Name(Fields.IsFixed))
                               .Boolean(f => f.Name(s => s.IsHidden).IndexName(Fields.IsHidden))
                               .Boolean(f => f.Name(s => s.IsRegressed).IndexName(Fields.IsRegressed))
                               .Boolean(f => f.Name(s => s.OccurrencesAreCritical).IndexName(Fields.OccurrencesAreCritical))
                               .Number(f => f.Name(s => s.TotalOccurrences).IndexName(Fields.TotalOccurrences))
                               ));
        }
        public Nest.RootObjectMapping GetRootMapping()
        {
            PutMappingDescriptor <GenericJsonItem> putMappingRequest = new PutMappingDescriptor <GenericJsonItem>(ElasticClientWrapper.ConnectionSettings);

            putMappingRequest.MapFromAttributes();
            putMappingRequest.TimestampField(t => t.Enabled().Path("date"));
            putMappingRequest.Type(Type.Name);
            return(((IPutMappingRequest)putMappingRequest).Mapping);
        }
 public override PutMappingDescriptor <Identity> BuildMapping(PutMappingDescriptor <Identity> map)
 {
     return(map
            .Type(Name)
            .Dynamic(false)
            .Properties(p => p
                        .String(f => f.Name(e => e.Id).IndexName(Fields.Id).Index(FieldIndexOption.NotAnalyzed))
                        ));
 }
示例#4
0
 public override PutMappingDescriptor <LogEvent> BuildMapping(PutMappingDescriptor <LogEvent> map)
 {
     return(map
            .Type(Name)
            .Dynamic(false)
            .Properties(p => p
                        .String(f => f.Name(e => e.Id).IndexName(Fields.Id).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.CompanyId).IndexName(Fields.CompanyId).Index(FieldIndexOption.NotAnalyzed))
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName(Fields.CreatedUtc))
                        ));
 }
 public override PutMappingDescriptor <WebHook> BuildMapping(PutMappingDescriptor <WebHook> map)
 {
     return(map
            .Type(Name)
            .Dynamic()
            .Properties(p => p
                        .SetupDefaults()
                        .String(f => f.Name(e => e.OrganizationId).IndexName(Fields.OrganizationId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ProjectId).IndexName(Fields.ProjectId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Url).IndexName(Fields.Url).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.EventTypes).IndexName(Fields.EventTypes).Index(FieldIndexOption.NotAnalyzed))
                        ));
 }
示例#6
0
 public override PutMappingDescriptor <Project> BuildMapping(PutMappingDescriptor <Project> map)
 {
     return(map
            .Type(Name)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .SetupDefaults()
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName(Fields.ModifiedUtc))
                        .String(f => f.Name(e => e.OrganizationId).IndexName(Fields.OrganizationId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Name).IndexName(Fields.Name).Index(FieldIndexOption.Analyzed))
                        .String(f => f.Name(u => u.PromotedTabs).IndexName(Fields.PromotedTabs).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.CustomContent).IndexName(Fields.CustomContent).Index(FieldIndexOption.No))
                        .Object <ClientConfiguration>(f => f.Name(u => u.Configuration).Dynamic(false))
                        .Object <Dictionary <string, NotificationSettings> >(f => f.Name(u => u.NotificationSettings).Dynamic(false))
                        .Object <DataDictionary>(f => f.Name(u => u.Data).Dynamic(false))
                        ));
 }
 public override PutMappingDescriptor <Organization> BuildMapping(PutMappingDescriptor <Organization> map)
 {
     return(map
            .Type(Name)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .SetupDefaults()
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName(Fields.ModifiedUtc))
                        .String(f => f.Name(e => e.Name).IndexName(Fields.Name).Index(FieldIndexOption.Analyzed))
                        .String(f => f.Name(u => u.StripeCustomerId).IndexName(Fields.StripeCustomerId).Index(FieldIndexOption.NotAnalyzed))
                        .Boolean(f => f.Name(u => u.HasPremiumFeatures).IndexName(Fields.HasPremiumFeatures))
                        .String(f => f.Name(u => u.PlanId).IndexName(Fields.PlanId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PlanName).IndexName(Fields.PlanName).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PlanDescription).IndexName(Fields.PlanDescription).Index(FieldIndexOption.No))
                        .String(f => f.Name(u => u.CardLast4).IndexName(Fields.CardLast4).Index(FieldIndexOption.NotAnalyzed))
                        .Date(f => f.Name(u => u.SubscribeDate).IndexName(Fields.SubscribeDate))
                        .Number(f => f.Name(u => u.BillingStatus).IndexName(Fields.BillingStatus))
                        .String(f => f.Name(u => u.BillingChangedByUserId).IndexName(Fields.BillingChangedByUserId).Index(FieldIndexOption.NotAnalyzed))
                        .Number(f => f.Name(u => u.BillingPrice).IndexName(Fields.BillingPrice))
                        .Boolean(f => f.Name(u => u.IsSuspended).IndexName(Fields.IsSuspended))
                        .String(f => f.Name(u => u.SuspendedByUserId).IndexName(Fields.SuspendedByUserId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.SuspensionNotes).IndexName(Fields.SuspensionNotes).Index(FieldIndexOption.NotAnalyzed))
                        .Number(f => f.Name(u => u.RetentionDays).IndexName(Fields.RetentionDays))
                        .Object <DataDictionary>(f => f.Name(u => u.Data).Dynamic(false))
                        .Object <Invite>(f => f.Name(o => o.Invites.First()).Path("just_name").Properties(ip => ip
                                                                                                          .String(fu => fu.Name(i => i.Token).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.InviteToken))
                                                                                                          .String(fu => fu.Name(i => i.EmailAddress).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.InviteEmail))))
                        .Object <UsageInfo>(ui => ui.Name(o => o.Usage.First()).Path("just_name").Properties(ip => ip
                                                                                                             .Date(fu => fu.Name(i => i.Date).IndexName(Fields.UsageDate))
                                                                                                             .Number(fu => fu.Name(i => i.Total).IndexName(Fields.UsageTotal))
                                                                                                             .Number(fu => fu.Name(i => i.Blocked).IndexName(Fields.UsageBlocked))
                                                                                                             .Number(fu => fu.Name(i => i.Limit).IndexName(Fields.UsageLimit))
                                                                                                             .Number(fu => fu.Name(i => i.TooBig).IndexName(Fields.UsageTooBig))))
                        .Object <UsageInfo>(ui => ui.Name(o => o.OverageHours.First()).Path("just_name").Properties(ip => ip
                                                                                                                    .Date(fu => fu.Name(i => i.Date).IndexName(Fields.OverageHoursDate))
                                                                                                                    .Number(fu => fu.Name(i => i.Total).IndexName(Fields.OverageHoursTotal))
                                                                                                                    .Number(fu => fu.Name(i => i.Blocked).IndexName(Fields.OverageHoursBlocked))
                                                                                                                    .Number(fu => fu.Name(i => i.Limit).IndexName(Fields.OverageHoursLimit))
                                                                                                                    .Number(fu => fu.Name(i => i.TooBig).IndexName(Fields.OverageHoursTooBig))))
                        ));
 }
示例#8
0
 public override PutMappingDescriptor <Models.Token> BuildMapping(PutMappingDescriptor <Models.Token> map)
 {
     return(map
            .Type(Name)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .SetupDefaults()
                        .String(f => f.Name(e => e.CreatedBy).IndexName(Fields.CreatedBy).Index(FieldIndexOption.NotAnalyzed))
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName(Fields.ModifiedUtc))
                        .String(f => f.Name(e => e.ApplicationId).IndexName(Fields.ApplicationId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.OrganizationId).IndexName(Fields.OrganizationId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ProjectId).IndexName(Fields.ProjectId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.DefaultProjectId).IndexName(Fields.DefaultProjectId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.UserId).IndexName(Fields.UserId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Refresh).IndexName(Fields.Refresh).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Scopes).IndexName(Fields.Scopes).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Notes).IndexName(Fields.Notes).Index(FieldIndexOption.No))
                        ));
 }
示例#9
0
 public override PutMappingDescriptor <User> BuildMapping(PutMappingDescriptor <User> map)
 {
     return(map
            .Type(Name)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .SetupDefaults()
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName(Fields.ModifiedUtc))
                        .String(f => f.Name(e => e.OrganizationIds).IndexName(Fields.OrganizationIds).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.FullName).IndexName(Fields.FullName))
                        .String(f => f.Name(u => u.EmailAddress).IndexName(Fields.EmailAddress).Analyzer(KEYWORD_LOWERCASE_ANALYZER))
                        .String(f => f.Name(u => u.VerifyEmailAddressToken).IndexName(Fields.VerifyEmailAddressToken).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Password).IndexName(Fields.Password).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PasswordResetToken).IndexName(Fields.PasswordResetToken).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Salt).IndexName(Fields.Salt).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Roles).IndexName(Fields.Roles).Index(FieldIndexOption.NotAnalyzed))
                        .Object <OAuthAccount>(f => f.Name(o => o.OAuthAccounts.First()).Path("just_name").Properties(mp => mp
                                                                                                                      .String(fu => fu.Name(m => m.Provider).IndexName(Fields.OAuthAccountProvider).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                      .String(fu => fu.Name(m => m.ProviderUserId).IndexName(Fields.OAuthAccountProviderUserId).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                      .String(fu => fu.Name(m => m.Username).IndexName(Fields.OAuthAccountUsername).Index(FieldIndexOption.NotAnalyzed))))
                        ));
 }
 public Nest.RootObjectMapping GetRootMapping()
 {
     PutMappingDescriptor<GenericJsonItem> putMappingRequest = new PutMappingDescriptor<GenericJsonItem>(ElasticClientWrapper.ConnectionSettings);
     putMappingRequest.MapFromAttributes();
     putMappingRequest.TimestampField(t => t.Enabled().Path("date"));
     putMappingRequest.Type(Type.Name);
     return ((IPutMappingRequest)putMappingRequest).Mapping;
 }
示例#11
0
 public override PutMappingDescriptor <PersistentEvent> BuildMapping(PutMappingDescriptor <PersistentEvent> map)
 {
     return(map
            .Type(Name)
            .Dynamic(DynamicMappingOption.Ignore)
            .DynamicTemplates(dt => dt.Add(t => t.Name("idx_reference").Match("*-r").Mapping(m => m.Generic(f => f.Type("string").Index("not_analyzed")))))
            .IncludeInAll(false)
            .DisableSizeField(false) // Change to Size Field
            .Transform(t => t.Script(FLATTEN_ERRORS_SCRIPT).Language(ScriptLang.Groovy))
            .AllField(a => a.IndexAnalyzer(STANDARDPLUS_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER))
            .Properties(p => p
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName(Fields.CreatedUtc))
                        .String(f => f.Name(e => e.Id).IndexName(Fields.Id).Index(FieldIndexOption.NotAnalyzed).IncludeInAll())
                        .String(f => f.Name(e => e.OrganizationId).IndexName(Fields.OrganizationId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ProjectId).IndexName(Fields.ProjectId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.StackId).IndexName(Fields.StackId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ReferenceId).IndexName(Fields.ReferenceId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Type).IndexName(Fields.Type).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Source).IndexName(Fields.Source).Index(FieldIndexOption.Analyzed).IncludeInAll())
                        .Date(f => f.Name(e => e.Date).IndexName(Fields.Date))
                        .String(f => f.Name(e => e.Message).IndexName(Fields.Message).Index(FieldIndexOption.Analyzed).IncludeInAll())
                        .String(f => f.Name(e => e.Tags).IndexName(Fields.Tags).Index(FieldIndexOption.Analyzed).IncludeInAll().Boost(1.2))
                        .GeoPoint(f => f.Name(e => e.Geo).Name(Fields.Geo).IndexLatLon())
                        .Number(f => f.Name(e => e.Value).IndexName(Fields.Value))
                        .Number(f => f.Name(e => e.Count).IndexName(Fields.Count))
                        .Boolean(f => f.Name(e => e.IsFirstOccurrence).IndexName(Fields.IsFirstOccurrence))
                        .Boolean(f => f.Name(e => e.IsFixed).IndexName(Fields.IsFixed))
                        .Boolean(f => f.Name(e => e.IsHidden).IndexName(Fields.IsHidden))
                        .Object <object>(f => f.Name(Fields.IDX).Dynamic())
                        .Object <DataDictionary>(f => f.Name(e => e.Data).Path("just_name").Properties(p2 => p2
                                                                                                       .String(f2 => f2.Name(Event.KnownDataKeys.Version).IndexName(Fields.Version).Index(FieldIndexOption.Analyzed).Analyzer(VERSION_INDEX_ANALYZER).SearchAnalyzer(VERSION_SEARCH_ANALYZER))
                                                                                                       .String(f2 => f2.Name(Event.KnownDataKeys.Level).IndexName(Fields.Level).Index(FieldIndexOption.Analyzed))
                                                                                                       .String(f2 => f2.Name(Event.KnownDataKeys.SubmissionMethod).IndexName(Fields.SubmissionMethod).Index(FieldIndexOption.Analyzed))
                                                                                                       .Object <Location>(f2 => f2.Name(Event.KnownDataKeys.Location).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                                   .String(f3 => f3.Name(r => r.Country).IndexName(Fields.LocationCountry).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                                                                                                   .String(f3 => f3.Name(r => r.Level1).IndexName(Fields.LocationLevel1).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                                                                                                   .String(f3 => f3.Name(r => r.Level2).IndexName(Fields.LocationLevel2).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                                                                                                   .String(f3 => f3.Name(r => r.Locality).IndexName(Fields.LocationLocality).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                       .Object <RequestInfo>(f2 => f2.Name(Event.KnownDataKeys.RequestInfo).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                                         .String(f3 => f3.Name(r => r.ClientIpAddress).IndexName(Fields.IpAddress).Index(FieldIndexOption.Analyzed).IncludeInAll().Analyzer(COMMA_WHITESPACE_ANALYZER))
                                                                                                                                                                                                         .String(f3 => f3.Name(r => r.UserAgent).IndexName(Fields.RequestUserAgent).Index(FieldIndexOption.Analyzed))
                                                                                                                                                                                                         .String(f3 => f3.Name(r => r.Path).IndexName(Fields.RequestPath).Index(FieldIndexOption.Analyzed).IncludeInAll())
                                                                                                                                                                                                         .Object <DataDictionary>(f3 => f3.Name(e => e.Data).Path("just_name").Properties(p4 => p4
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.Browser).IndexName(Fields.Browser).Index(FieldIndexOption.Analyzed)
                                                                                                                                                                                                                                                                                                  .Fields(fields => fields.String(ss => ss.Name(Fields.BrowserRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.BrowserVersion).IndexName(Fields.BrowserVersion).Index(FieldIndexOption.Analyzed)
                                                                                                                                                                                                                                                                                                  .Fields(fields => fields.String(ss => ss.Name(Fields.BrowserVersionRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.BrowserMajorVersion).IndexName(Fields.BrowserMajorVersion).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.Device).IndexName(Fields.Device).Index(FieldIndexOption.Analyzed)
                                                                                                                                                                                                                                                                                                  .Fields(fields => fields.String(ss => ss.Name(Fields.DeviceRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.OS).IndexName(Fields.OperatingSystem).Index(FieldIndexOption.Analyzed)
                                                                                                                                                                                                                                                                                                  .Fields(fields => fields.String(ss => ss.Name(Fields.OperatingSystemRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.OSVersion).IndexName(Fields.OperatingSystemVersion).Index(FieldIndexOption.Analyzed)
                                                                                                                                                                                                                                                                                                  .Fields(fields => fields.String(ss => ss.Name(Fields.OperatingSystemVersionRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                                                                                                          .String(f4 => f4.Name(RequestInfo.KnownDataKeys.OSMajorVersion).IndexName(Fields.OperatingSystemMajorVersion).Index(FieldIndexOption.NotAnalyzed))
                                                                                                                                                                                                                                                                                          .Boolean(f4 => f4.Name(RequestInfo.KnownDataKeys.IsBot).IndexName(Fields.RequestIsBot))))))
                                                                                                       .Object <Error>(f2 => f2.Name(Event.KnownDataKeys.Error).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                             .String(f3 => f3.Name("all_codes").IndexName(Fields.ErrorCode).Index(FieldIndexOption.NotAnalyzed).Analyzer("whitespace").IncludeInAll().Boost(1.1))
                                                                                                                                                                                             .String(f3 => f3.Name("all_messages").IndexName(Fields.ErrorMessage).Index(FieldIndexOption.Analyzed).IncludeInAll())
                                                                                                                                                                                             .Object <DataDictionary>(f4 => f4.Name(e => e.Data).Path("just_name").Properties(p4 => p4
                                                                                                                                                                                                                                                                              .Object <object>(f5 => f5.Name(Error.KnownDataKeys.TargetInfo).Path("just_name").Properties(p5 => p5
                                                                                                                                                                                                                                                                                                                                                                          .String(f6 => f6.Name("ExceptionType").IndexName(Fields.ErrorTargetType).Index(FieldIndexOption.Analyzed).Analyzer(TYPENAME_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER).IncludeInAll().Boost(1.2)
                                                                                                                                                                                                                                                                                                                                                                                  .Fields(fields => fields.String(ss => ss.Name(Fields.ErrorTargetTypeRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                                                                                                                                                                                          .String(f6 => f6.Name("Method").IndexName(Fields.ErrorTargetMethod).Index(FieldIndexOption.Analyzed).Analyzer(TYPENAME_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER).IncludeInAll().Boost(1.2))))))
                                                                                                                                                                                             .String(f3 => f3.Name("all_types").IndexName(Fields.ErrorType).Index(FieldIndexOption.Analyzed).Analyzer(TYPENAME_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER).IncludeInAll().Boost(1.1))))
                                                                                                       .Object <SimpleError>(f2 => f2.Name(Event.KnownDataKeys.SimpleError).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                                         .String(f3 => f3.Name("all_messages").IndexName(Fields.ErrorMessage).Index(FieldIndexOption.Analyzed).IncludeInAll())
                                                                                                                                                                                                         .Object <DataDictionary>(f4 => f4.Name(e => e.Data).Path("just_name").Properties(p4 => p4
                                                                                                                                                                                                                                                                                          .Object <object>(f5 => f5.Name(Error.KnownDataKeys.TargetInfo).Path("just_name").Properties(p5 => p5
                                                                                                                                                                                                                                                                                                                                                                                      .String(f6 => f6.Name("ExceptionType").IndexName(Fields.ErrorTargetType).Index(FieldIndexOption.Analyzed).Analyzer(TYPENAME_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER).IncludeInAll().Boost(1.2))))))
                                                                                                                                                                                                         .String(f3 => f3.Name("all_types").IndexName(Fields.ErrorType).Index(FieldIndexOption.Analyzed).Analyzer(TYPENAME_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER).IncludeInAll().Boost(1.1))))
                                                                                                       .Object <EnvironmentInfo>(f2 => f2.Name(Event.KnownDataKeys.EnvironmentInfo).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                                                 .String(f3 => f3.Name(r => r.IpAddress).IndexName(Fields.IpAddress).Index(FieldIndexOption.Analyzed).IncludeInAll().Analyzer(COMMA_WHITESPACE_ANALYZER))
                                                                                                                                                                                                                 .String(f3 => f3.Name(r => r.MachineName).IndexName(Fields.MachineName).Index(FieldIndexOption.Analyzed).IncludeInAll().Boost(1.1))
                                                                                                                                                                                                                 .String(f3 => f3.Name(r => r.OSName).IndexName(Fields.OperatingSystem).Index(FieldIndexOption.Analyzed))
                                                                                                                                                                                                                 .String(f3 => f3.Name(r => r.Architecture).IndexName(Fields.MachineArchitecture).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                       .Object <UserDescription>(f2 => f2.Name(Event.KnownDataKeys.UserDescription).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                                                 .String(f3 => f3.Name(r => r.Description).IndexName(Fields.UserDescription).Index(FieldIndexOption.Analyzed).IncludeInAll())
                                                                                                                                                                                                                 .String(f3 => f3.Name(r => r.EmailAddress).IndexName(Fields.UserEmail).Index(FieldIndexOption.Analyzed).Analyzer(EMAIL_ANALYZER).SearchAnalyzer("simple").IncludeInAll().Boost(1.1))))
                                                                                                       .Object <UserInfo>(f2 => f2.Name(Event.KnownDataKeys.UserInfo).Path("just_name").Properties(p3 => p3
                                                                                                                                                                                                   .String(f3 => f3.Name(r => r.Identity).IndexName(Fields.User).Index(FieldIndexOption.Analyzed).Analyzer(EMAIL_ANALYZER).SearchAnalyzer(WHITESPACE_LOWERCASE_ANALYZER).IncludeInAll().Boost(1.1)
                                                                                                                                                                                                           .Fields(fields => fields.String(ss => ss.Name(Fields.UserRaw).Index(FieldIndexOption.NotAnalyzed))))
                                                                                                                                                                                                   .String(f3 => f3.Name(r => r.Name).IndexName(Fields.UserName).Index(FieldIndexOption.Analyzed).IncludeInAll())))))
                        ));
 }
 public virtual PutMappingDescriptor <T> BuildMapping(PutMappingDescriptor <T> map)
 {
     return(map.Type(Name).Properties(p => p.SetupDefaults()));
 }