private string GetDateField(ElasticTypeSettings settings) { if (settings != null && settings.IndexType.GetType() == typeof(StackIndexType)) { return(_stackLastOccurrenceFieldName); } return(_eventDateFieldName); }
private string GetDateField(ElasticTypeSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } var indexType = settings.IndexType.GetType(); if (indexType == typeof(StackIndexType)) { return(_stackLastOccurrenceFieldName); } if (indexType == typeof(EventIndexType)) { return(_eventDateFieldName); } return(null); }
private bool ShouldApplyRetentionFilter(ElasticTypeSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } var indexType = settings.IndexType.GetType(); if (indexType == typeof(StackIndexType)) { return(true); } if (indexType == typeof(EventIndexType)) { return(true); } return(false); }