Esempio n. 1
0
 private static PutMappingDescriptor<TechnicalProduct> MapTechnicalProduct(PutMappingDescriptor<TechnicalProduct> m, string indexName)
 {
     return m
         .Index(indexName)
         .Type("technicalProducts")
         .DateDetection()
         .NumericDetection()
         .DynamicDateFormats(new[] { "dateOptionalTime", "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z" })
         .Dynamic(false)
         .IdField(i => i
             .SetIndex("not_analyzed")
             .SetStored()
         )
         .Properties(o => o
             .String(i => i
                 .Name(x => x.Name)
                 .Index(FieldIndexOption.analyzed)
                 .IndexAnalyzer("autocomplete")
                 .SearchAnalyzer("standard")
             )
             .String(i => i
                 .Name(x => x.Brand)
                 .Index(FieldIndexOption.analyzed)
                 .IndexAnalyzer("autocomplete")
                 .SearchAnalyzer("standard")
             )
         );
 }
Esempio n. 2
0
 private static PutMappingDescriptor <TechnicalProduct> MapTechnicalProduct(PutMappingDescriptor <TechnicalProduct> m, string indexName)
 {
     return(m
            .Index(indexName)
            .Type("technicalProducts")
            .DateDetection()
            .NumericDetection()
            .DynamicDateFormats(new[] { "dateOptionalTime", "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z" })
            .Dynamic(false)
            .IdField(i => i
                     .Index("not_analyzed")
                     .Store()
                     )
            .Properties(o => o
                        .String(i => i
                                .Name(x => x.Name)
                                .Index(FieldIndexOption.Analyzed)
                                .IndexAnalyzer("autocomplete")
                                .SearchAnalyzer("standard")
                                )
                        .String(i => i
                                .Name(x => x.Brand)
                                .Index(FieldIndexOption.Analyzed)
                                .IndexAnalyzer("autocomplete")
                                .SearchAnalyzer("standard")
                                )
                        ));
 }
 private PutMappingDescriptor<Application> GetApplicationMap(PutMappingDescriptor<Application> map){
     return map
         .Index(VersionedName)
         .Dynamic()
         .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
         .Properties(p => p
              .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
              .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
      );
 }
 private PutMappingDescriptor <Application> GetApplicationMap(PutMappingDescriptor <Application> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
                        ));
 }
 private PutMappingDescriptor <WebHook> GetWebHookMap(PutMappingDescriptor <WebHook> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .Properties(p => p
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
                        .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ProjectId).IndexName("project").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Url).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.EventTypes).IndexName("types").Index(FieldIndexOption.NotAnalyzed))
                        ));
 }
Esempio n. 6
0
 private PutMappingDescriptor<Employee> GetEmployeeMap(PutMappingDescriptor<Employee> map) {
     return map
         .Index(VersionedName)
         .Dynamic()
         .TimestampField(ts => ts.Enabled().Path(u => u.UpdatedUtc).IgnoreMissing(false))
         .Properties(p => p
             .String(f => f.Name(e => e.Id).IndexName(Fields.Employee.Id).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.CompanyId).IndexName(Fields.Employee.CompanyId).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.CompanyName).IndexName(Fields.Employee.CompanyName).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.Name).IndexName(Fields.Employee.Name).Index(FieldIndexOption.NotAnalyzed))
             .Number(f => f.Name(e => e.Age).IndexName(Fields.Employee.Age))
             .Date(f => f.Name(e => e.CreatedUtc).IndexName(Fields.Employee.CreatedUtc))
             .Date(f => f.Name(e => e.UpdatedUtc).IndexName(Fields.Employee.UpdatedUtc))
         );
 }
Esempio n. 7
0
 private PutMappingDescriptor <Employee> GetEmployeeMap(PutMappingDescriptor <Employee> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.UpdatedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .String(f => f.Name(e => e.Id).IndexName(Fields.Employee.Id).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.CompanyId).IndexName(Fields.Employee.CompanyId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.CompanyName).IndexName(Fields.Employee.CompanyName).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Name).IndexName(Fields.Employee.Name).Index(FieldIndexOption.NotAnalyzed))
                        .Number(f => f.Name(e => e.Age).IndexName(Fields.Employee.Age))
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName(Fields.Employee.CreatedUtc))
                        .Date(f => f.Name(e => e.UpdatedUtc).IndexName(Fields.Employee.UpdatedUtc))
                        ));
 }
 private PutMappingDescriptor <Project> GetProjectMap(PutMappingDescriptor <Project> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName("modified"))
                        .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PromotedTabs).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.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))
                        ));
 }
 private PutMappingDescriptor <Organization> GetOrganizationMap(PutMappingDescriptor <Organization> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName(Fields.Organization.CreatedUtc))
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName(Fields.Organization.ModifiedUtc))
                        .String(f => f.Name(e => e.Id).IndexName(Fields.Organization.Id).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Name).IndexName(Fields.Organization.Name).Index(FieldIndexOption.Analyzed))
                        .String(f => f.Name(u => u.StripeCustomerId).IndexName("stripe").Index(FieldIndexOption.NotAnalyzed))
                        .Boolean(f => f.Name(u => u.HasPremiumFeatures).IndexName("premium"))
                        .String(f => f.Name(u => u.PlanId).IndexName(Fields.Organization.PlanId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PlanName).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PlanDescription).Index(FieldIndexOption.No))
                        .String(f => f.Name(u => u.CardLast4).Index(FieldIndexOption.NotAnalyzed))
                        .Date(f => f.Name(u => u.SubscribeDate).IndexName(Fields.Organization.SubscribeDate))
                        .Number(f => f.Name(u => u.BillingStatus).IndexName(Fields.Organization.BillingStatus))
                        .String(f => f.Name(u => u.BillingChangedByUserId).Index(FieldIndexOption.NotAnalyzed))
                        .Number(f => f.Name(u => u.BillingPrice).IndexName(Fields.Organization.BillingPrice))
                        .Boolean(f => f.Name(u => u.IsSuspended).IndexName(Fields.Organization.IsSuspended))
                        .String(f => f.Name(u => u.SuspendedByUserId).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.SuspensionNotes).Index(FieldIndexOption.NotAnalyzed))
                        .Number(f => f.Name(u => u.RetentionDays).IndexName("retention"))
                        .Object <DataDictionary>(f => f.Name(u => u.Data).Dynamic(false))
                        .Object <Invite>(f => f.Name(o => o.Invites.First()).RootPath().Properties(ip => ip
                                                                                                   .String(fu => fu.Name(i => i.Token).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.Organization.InviteToken))
                                                                                                   .String(fu => fu.Name(i => i.EmailAddress).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.Organization.InviteEmail))))
                        .Object <UsageInfo>(ui => ui.Name(o => o.Usage.First()).RootPath().Properties(ip => ip
                                                                                                      .Date(fu => fu.Name(i => i.Date).IndexName(Fields.Organization.UsageDate))
                                                                                                      .Number(fu => fu.Name(i => i.Total).IndexName(Fields.Organization.UsageTotal))
                                                                                                      .Number(fu => fu.Name(i => i.Blocked).IndexName(Fields.Organization.UsageBlocked))
                                                                                                      .Number(fu => fu.Name(i => i.Limit).IndexName(Fields.Organization.UsageLimit))
                                                                                                      .Number(fu => fu.Name(i => i.TooBig).IndexName(Fields.Organization.UsageTooBig))))
                        .Object <UsageInfo>(ui => ui.Name(o => o.OverageHours.First()).RootPath().Properties(ip => ip
                                                                                                             .Date(fu => fu.Name(i => i.Date).IndexName(Fields.Organization.OverageHoursDate))
                                                                                                             .Number(fu => fu.Name(i => i.Total).IndexName(Fields.Organization.OverageHoursTotal))
                                                                                                             .Number(fu => fu.Name(i => i.Blocked).IndexName(Fields.Organization.OverageHoursBlocked))
                                                                                                             .Number(fu => fu.Name(i => i.Limit).IndexName(Fields.Organization.OverageHoursLimit))
                                                                                                             .Number(fu => fu.Name(i => i.TooBig).IndexName(Fields.Organization.OverageHoursTooBig))))
                        ));
 }
Esempio n. 10
0
 private PutMappingDescriptor<Organization> GetOrganizationMap(PutMappingDescriptor<Organization> map){
     return map
         .Index(VersionedName)
         .Dynamic()
         .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
         .Properties(p => p
             .Date(f => f.Name(e => e.CreatedUtc).IndexName(Fields.Organization.CreatedUtc))
             .Date(f => f.Name(e => e.ModifiedUtc).IndexName(Fields.Organization.ModifiedUtc))
             .String(f => f.Name(e => e.Id).IndexName(Fields.Organization.Id).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.Name).IndexName(Fields.Organization.Name).Index(FieldIndexOption.Analyzed))
             .String(f => f.Name(u => u.StripeCustomerId).IndexName("stripe").Index(FieldIndexOption.NotAnalyzed))
             .Boolean(f => f.Name(u => u.HasPremiumFeatures).IndexName("premium"))
             .String(f => f.Name(u => u.PlanId).IndexName(Fields.Organization.PlanId).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.PlanName).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.PlanDescription).Index(FieldIndexOption.No))
             .String(f => f.Name(u => u.CardLast4).Index(FieldIndexOption.NotAnalyzed))
             .Date(f => f.Name(u => u.SubscribeDate).IndexName(Fields.Organization.SubscribeDate))
             .Number(f => f.Name(u => u.BillingStatus).IndexName(Fields.Organization.BillingStatus))
             .String(f => f.Name(u => u.BillingChangedByUserId).Index(FieldIndexOption.NotAnalyzed))
             .Number(f => f.Name(u => u.BillingPrice).IndexName(Fields.Organization.BillingPrice))
             .Boolean(f => f.Name(u => u.IsSuspended).IndexName(Fields.Organization.IsSuspended))
             .String(f => f.Name(u => u.SuspendedByUserId).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.SuspensionNotes).Index(FieldIndexOption.NotAnalyzed))
             .Number(f => f.Name(u => u.RetentionDays).IndexName("retention"))
             .Object<DataDictionary>(f => f.Name(u => u.Data).Dynamic(false))
             .Object<Invite>(f => f.Name(o => o.Invites.First()).RootPath().Properties(ip => ip
                 .String(fu => fu.Name(i => i.Token).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.Organization.InviteToken))
                 .String(fu => fu.Name(i => i.EmailAddress).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.Organization.InviteEmail))))
             .Object<UsageInfo>(ui => ui.Name(o => o.Usage.First()).RootPath().Properties(ip => ip
                 .Date(fu => fu.Name(i => i.Date).IndexName(Fields.Organization.UsageDate))
                 .Number(fu => fu.Name(i => i.Total).IndexName(Fields.Organization.UsageTotal))
                 .Number(fu => fu.Name(i => i.Blocked).IndexName(Fields.Organization.UsageBlocked))
                 .Number(fu => fu.Name(i => i.Limit).IndexName(Fields.Organization.UsageLimit))
                 .Number(fu => fu.Name(i => i.TooBig).IndexName(Fields.Organization.UsageTooBig))))
             .Object<UsageInfo>(ui => ui.Name(o => o.OverageHours.First()).RootPath().Properties(ip => ip
                 .Date(fu => fu.Name(i => i.Date).IndexName(Fields.Organization.OverageHoursDate))
                 .Number(fu => fu.Name(i => i.Total).IndexName(Fields.Organization.OverageHoursTotal))
                 .Number(fu => fu.Name(i => i.Blocked).IndexName(Fields.Organization.OverageHoursBlocked))
                 .Number(fu => fu.Name(i => i.Limit).IndexName(Fields.Organization.OverageHoursLimit))
                 .Number(fu => fu.Name(i => i.TooBig).IndexName(Fields.Organization.OverageHoursTooBig))))
         );
 }
Esempio n. 11
0
 private PutMappingDescriptor <Models.Token> GetTokenMap(PutMappingDescriptor <Models.Token> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .String(f => f.Name(e => e.CreatedBy).IndexName("createdby").Index(FieldIndexOption.NotAnalyzed))
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName("modified"))
                        .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ApplicationId).IndexName("application").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.ProjectId).IndexName("project").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.DefaultProjectId).IndexName("default_project").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.UserId).IndexName("user").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Refresh).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.Scopes).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Notes).Index(FieldIndexOption.No))
                        ));
 }
Esempio n. 12
0
 public PutMappingDescriptor <User> GetUserMap(PutMappingDescriptor <User> map)
 {
     return(map
            .Index(VersionedName)
            .Dynamic()
            .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
            .Properties(p => p
                        .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
                        .Date(f => f.Name(e => e.ModifiedUtc).IndexName("modified"))
                        .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(e => e.OrganizationIds).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.FullName).IndexName("name"))
                        .String(f => f.Name(u => u.EmailAddress).IndexName("email").Analyzer(KEYWORD_LOWERCASE))
                        .String(f => f.Name(u => u.Password).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Salt).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.PasswordResetToken).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.VerifyEmailAddressToken).Index(FieldIndexOption.NotAnalyzed))
                        .String(f => f.Name(u => u.Roles).Index(FieldIndexOption.NotAnalyzed))
                        .Object <OAuthAccount>(f => f.Name(o => o.OAuthAccounts.First()).RootPath().Properties(mp => mp
                                                                                                               .String(fu => fu.Name(m => m.Provider).Index(FieldIndexOption.NotAnalyzed))
                                                                                                               .String(fu => fu.Name(m => m.ProviderUserId).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.User.OAuthAccountProviderUserId))
                                                                                                               .String(fu => fu.Name(m => m.Username).Index(FieldIndexOption.NotAnalyzed))))
                        ));
 }
 private PutMappingDescriptor<Project> GetProjectMap(PutMappingDescriptor<Project> map) {
     return map
         .Index(VersionedName)
         .Dynamic()
         .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
         .Properties(p => p
             .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
             .Date(f => f.Name(e => e.ModifiedUtc).IndexName("modified"))
             .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.PromotedTabs).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.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))
         );
 }
 private PutMappingDescriptor<WebHook> GetWebHookMap(PutMappingDescriptor<WebHook> map) {
     return map
         .Index(VersionedName)
         .Dynamic()
         .Properties(p => p
             .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
             .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.ProjectId).IndexName("project").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.Url).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.EventTypes).IndexName("types").Index(FieldIndexOption.NotAnalyzed))
         );
 }
 public PutMappingDescriptor<User> GetUserMap(PutMappingDescriptor<User> map) {
     return map
         .Index(VersionedName)
         .Dynamic()
         .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
         .Properties(p => p
             .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
             .Date(f => f.Name(e => e.ModifiedUtc).IndexName("modified"))
             .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.OrganizationIds).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.FullName).IndexName("name"))
             .String(f => f.Name(u => u.EmailAddress).IndexName("email").Analyzer(KEYWORD_LOWERCASE))
             .String(f => f.Name(u => u.Password).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.Salt).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.PasswordResetToken).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.VerifyEmailAddressToken).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.Roles).Index(FieldIndexOption.NotAnalyzed))
             .Object<OAuthAccount>(f => f.Name(o => o.OAuthAccounts.First()).RootPath().Properties(mp => mp
                 .String(fu => fu.Name(m => m.Provider).Index(FieldIndexOption.NotAnalyzed))
                 .String(fu => fu.Name(m => m.ProviderUserId).Index(FieldIndexOption.NotAnalyzed).IndexName(Fields.User.OAuthAccountProviderUserId))
                 .String(fu => fu.Name(m => m.Username).Index(FieldIndexOption.NotAnalyzed))))
         );
 }
 private PutMappingDescriptor<Models.Token> GetTokenMap(PutMappingDescriptor<Models.Token> map) {
     return map
         .Index(VersionedName)
         .Dynamic()
         .TimestampField(ts => ts.Enabled().Path(u => u.ModifiedUtc).IgnoreMissing(false))
         .Properties(p => p
             .String(f => f.Name(e => e.CreatedBy).IndexName("createdby").Index(FieldIndexOption.NotAnalyzed))
             .Date(f => f.Name(e => e.CreatedUtc).IndexName("created"))
             .Date(f => f.Name(e => e.ModifiedUtc).IndexName("modified"))
             .String(f => f.Name(e => e.Id).IndexName("id").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.ApplicationId).IndexName("application").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.OrganizationId).IndexName("organization").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.ProjectId).IndexName("project").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.DefaultProjectId).IndexName("default_project").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.UserId).IndexName("user").Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.Refresh).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(e => e.Scopes).Index(FieldIndexOption.NotAnalyzed))
             .String(f => f.Name(u => u.Notes).Index(FieldIndexOption.No))
         );
 }