public Task <FindResults <PersistentEvent> > GetByFilterAsync(string systemFilter, string userFilter, string sort, SortOrder sortOrder, string field, DateTime utcStart, DateTime utcEnd, PagingOptions paging) { if (String.IsNullOrEmpty(sort)) { sort = EventIndex.Fields.PersistentEvent.Date; sortOrder = SortOrder.Descending; } var search = new ExceptionlessQuery() .WithDateRange(utcStart, utcEnd, field ?? EventIndex.Fields.PersistentEvent.Date) .WithIndices(utcStart, utcEnd, $"'{_index.VersionedName}-'yyyyMM") .WithSystemFilter(systemFilter) .WithFilter(userFilter) .WithPaging(paging) .WithSort(sort, sortOrder); return(FindAsync(search)); }
public Task <FindResults <Stack> > GetByFilterAsync(string systemFilter, string userFilter, string sort, SortOrder sortOrder, string field, DateTime utcStart, DateTime utcEnd, PagingOptions paging) { if (String.IsNullOrEmpty(sort)) { sort = StackIndex.Fields.Stack.LastOccurrence; sortOrder = SortOrder.Descending; } var search = new ExceptionlessQuery() .WithDateRange(utcStart, utcEnd, field ?? StackIndex.Fields.Stack.LastOccurrence) .WithSystemFilter(systemFilter) .WithFilter(userFilter) .WithPaging(paging) .WithSort(sort, sortOrder); return(FindAsync(search)); }