private string GetDateField(ElasticTypeSettings settings)
        {
            if (settings != null && settings.IndexType.GetType() == typeof(StackIndexType))
            {
                return(_stackLastOccurrenceFieldName);
            }

            return(_eventDateFieldName);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }