public MonthlyEmployeeIndex(IElasticConfiguration configuration, int version) : base(configuration, "monthly-employees", version) { AddAlias($"{Name}-today", TimeSpan.FromDays(1)); AddAlias($"{Name}-last7days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last30days", TimeSpan.FromDays(30)); AddAlias($"{Name}-last60days", TimeSpan.FromDays(60)); }
public DailyLogEventIndex(IElasticConfiguration configuration) : base(configuration, "daily-logevents", 1) { AddType(LogEvent = new LogEventType(this)); AddAlias($"{Name}-today", TimeSpan.FromDays(1)); AddAlias($"{Name}-last7days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last30days", TimeSpan.FromDays(30)); }
public DailyEmployeeIndex(IElasticConfiguration configuration, int version) : base(configuration, "daily-employees", version) { AddType(Employee = new DailyEmployeeType(this)); AddAlias($"{Name}-today", TimeSpan.FromDays(1)); AddAlias($"{Name}-last7days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last30days", TimeSpan.FromDays(30)); }
public DailyIndex(IElasticConfiguration configuration, string name, int version = 1) : base(configuration, name, version) { AddAlias(Name); _frozenAliases = new Lazy <IReadOnlyCollection <IndexAliasAge> >(() => _aliases.AsReadOnly()); _aliasCache = new ScopedCacheClient(configuration.Cache, "alias"); }
public MonthlyEmployeeIndex(IElasticConfiguration configuration, int version) : base(configuration, "monthly-employees", version) { AddType(Employee = new MonthlyEmployeeType(this)); AddAlias($"{Name}-today", TimeSpan.FromDays(1)); AddAlias($"{Name}-last7days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last30days", TimeSpan.FromDays(30)); AddAlias($"{Name}-last60days", TimeSpan.FromDays(60)); }
public VersionedEmployeeIndex(IElasticConfiguration configuration, int version) : base(configuration, "employees", version) { AddType(Employee = new EmployeeType(this)); AddReindexScript(20, "ctx._source.companyName = 'scripted';"); AddReindexScript(21, "ctx._source.companyName = 'NOOO';", "notEmployee"); AddReindexScript(21, "ctx._source.companyName = 'typed script';", "employee"); AddReindexScript(22, "ctx._source.FAIL = 'should not work"); }
public OrganizationIndex(IElasticConfiguration configuration) : base(configuration, Settings.Current.AppScopePrefix + "organizations", 1) { AddType(Organization = new OrganizationIndexType(this)); AddType(Project = new ProjectIndexType(this)); AddType(Token = new TokenIndexType(this)); AddType(User = new UserIndexType(this)); AddType(WebHook = new WebHookIndexType(this)); }
public IndexBase(IElasticConfiguration configuration, string name) { Name = name; Configuration = configuration; _lockProvider = new CacheLockProvider(configuration.Cache, configuration.MessageBus, configuration.LoggerFactory); _logger = configuration.LoggerFactory.CreateLogger(GetType()); _frozenTypes = new Lazy <IReadOnlyCollection <IIndexType> >(() => _types.AsReadOnly()); }
public OrganizationIndex(IElasticConfiguration configuration) : base(configuration, Settings.Current.AppScopePrefix + "organization", 18) { AddType(OrganizationType = new OrganizationType(this)); AddType(UserType = new UserType(this)); AddType(TokenType = new TokenType(this)); AddType(NotificationType = new NotificationType(this)); AddType(MigrationType = new MigrationType(this)); }
public ElasticMigrationJobBase(MigrationManager migrationManager, IElasticConfiguration configuration, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _migrationManager = new Lazy <MigrationManager>(() => { Configure(migrationManager); return(migrationManager); }); _configuration = configuration; }
public Index(IElasticConfiguration configuration, string name = null) { Name = name; Configuration = configuration; _queryBuilder = new Lazy <IElasticQueryBuilder>(CreateQueryBuilder); _queryParser = new Lazy <ElasticQueryParser>(CreateQueryParser); _mappingResolver = new Lazy <ElasticMappingResolver>(CreateMappingResolver); _fieldResolver = new Lazy <QueryFieldResolver>(CreateQueryFieldResolver); _logger = configuration.LoggerFactory?.CreateLogger(GetType()) ?? NullLogger.Instance; }
public EventIndex(IElasticConfiguration configuration) : base(configuration, Settings.Current.AppScopePrefix + "events", 1) { MaxIndexAge = TimeSpan.FromDays(180); AddType(Event = new EventIndexType(this)); AddAlias($"{Name}-today", TimeSpan.FromDays(1)); AddAlias($"{Name}-last3days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last7days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last30days", TimeSpan.FromDays(30)); AddAlias($"{Name}-last90days", TimeSpan.FromDays(90)); }
public DailyIndex(IElasticConfiguration configuration, string name, int version = 1, Func <object, DateTime> getDocumentDateUtc = null) : base(configuration, name, version) { AddAlias(Name); _frozenAliases = new Lazy <IReadOnlyCollection <IndexAliasAge> >(() => _aliases.AsReadOnly()); _aliasCache = new ScopedCacheClient(configuration.Cache, "alias"); _getDocumentDateUtc = getDocumentDateUtc; _defaultIndexes = new[] { Name }; HasMultipleIndexes = true; if (_getDocumentDateUtc != null) { _getDocumentDateUtc = (document) => { var date = getDocumentDateUtc(document); return(date != DateTime.MinValue ? date : DefaultDocumentDateFunc(document)); } } ; else { _getDocumentDateUtc = DefaultDocumentDateFunc; } }
public ParentChildIndex(IElasticConfiguration configuration): base(configuration, "parentchild", 1) { AddType(Parent = new ParentType(this)); AddType(Child = new ChildType(this)); }
public IdentityIndex(IElasticConfiguration configuration) : base(configuration, "identity") { AddType(Identity = new IdentityType(this)); }
public MonthlyLogEventIndex(IElasticConfiguration configuration) : base(configuration, "monthly-logevents", 1) { AddType(LogEvent = new LogEventType(this)); AddAlias($"{Name}-thismonth", TimeSpan.FromDays(32)); AddAlias($"{Name}-last3months", TimeSpan.FromDays(100)); }
public VersionedIndex(IElasticConfiguration configuration, string name, int version = 1) : base(configuration, name) { Version = version; VersionedName = String.Concat(Name, "-v", Version); }
public IdentityIndex(IElasticConfiguration configuration) : base(configuration, "identity") { }
public MonthlyIndex(IElasticConfiguration configuration, string name, int version = 1) : base(configuration, name, version) { DateFormat = "yyyy.MM"; }
public EmployeeIndex(IElasticConfiguration configuration) : base(configuration, "employees") { AddType(Employee = new EmployeeType(this)); }
public ParentChildIndex(IElasticConfiguration configuration) : base(configuration, "parentchild", 1) { }
public MonthlyIndex(IElasticConfiguration configuration, string name, int version = 1, Func <object, DateTime> getDocumentDateUtc = null) : base(configuration, name, version, getDocumentDateUtc) { DateFormat = "yyyy.MM"; }
public StackIndex(IElasticConfiguration configuration) : base(configuration, Settings.Current.AppScopePrefix + "stacks", 1) { AddType(Stack = new StackIndexType(this)); }
public ParentChildIndex(IElasticConfiguration configuration) : base(configuration, "parentchild", 1) { AddType(Parent = new ParentType(this)); AddType(Child = new ChildType(this)); }
public VersionedEmployeeIndex(IElasticConfiguration configuration, int version) : base(configuration, "employees", version) { AddType(Employee = new EmployeeType(this)); }
public DailyEmployeeIndexWithWrongEmployeeType(IElasticConfiguration configuration, int version) : base(configuration, "daily-employees", version) { AddType(Employee = new EmployeeType(this)); }
public EmployeeIndex(IElasticConfiguration configuration): base(configuration, "employees") { AddType(Employee = new EmployeeType(this)); }
public EmployeeIndex(IElasticConfiguration configuration) : base(configuration, "employees") { }
public MigrationIndex(IElasticConfiguration configuration, string name = "migration", int replicas = 1) : base(configuration, name) { _replicas = replicas; }
public DailyLogEventIndex(IElasticConfiguration configuration) : base(configuration, "daily-logevents", 1, doc => ((LogEvent)doc).Date.UtcDateTime) { AddAlias($"{Name}-today", TimeSpan.FromDays(1)); AddAlias($"{Name}-last7days", TimeSpan.FromDays(7)); AddAlias($"{Name}-last30days", TimeSpan.FromDays(30)); }
public LogstashIndex(IElasticConfiguration configuration) : base(configuration, Settings.Current.AppScopePrefix + "logstash") { AddType(LogEventType = new LogEventType(this, "logevent")); }
public EmployeeIndexWithYearsEmployed(IElasticConfiguration configuration) : base(configuration, "employees") { }
public Index(IElasticConfiguration configuration, string name) : base(configuration, name) { }
public Index(IElasticConfiguration configuration, string name) : base(configuration, name) {}