@@ -31,11 +31,12 @@ public async Task<QueryResult<SagaHistory>> QuerySagaHistoryById(Guid input, Can
3131 return sagaHistory == null ? QueryResult < SagaHistory > . Empty ( ) : new QueryResult < SagaHistory > ( sagaHistory , new QueryStatsInfo ( $ "{ stats . ResultEtag } ", stats . TotalResults ) ) ;
3232 }
3333
34- public async Task < QueryResult < IList < MessagesView > > > GetMessages ( bool includeSystemMessages , PagingInfo pagingInfo , SortInfo sortInfo , CancellationToken cancellationToken )
34+ public async Task < QueryResult < IList < MessagesView > > > GetMessages ( bool includeSystemMessages , PagingInfo pagingInfo , SortInfo sortInfo , DateTimeRange timeSentRange , CancellationToken cancellationToken )
3535 {
3636 using var session = await sessionProvider . OpenSession ( cancellationToken : cancellationToken ) ;
3737 var results = await session . Query < MessagesViewIndex . SortAndFilterOptions > ( GetIndexName ( isFullTextSearchEnabled ) )
3838 . Statistics ( out var stats )
39+ . FilterBySentTimeRange ( timeSentRange )
3940 . IncludeSystemMessagesWhere ( includeSystemMessages )
4041 . Sort ( sortInfo )
4142 . Paging ( pagingInfo )
@@ -45,12 +46,13 @@ public async Task<QueryResult<IList<MessagesView>>> GetMessages(bool includeSyst
4546 return new QueryResult < IList < MessagesView > > ( results , stats . ToQueryStatsInfo ( ) ) ;
4647 }
4748
48- public async Task < QueryResult < IList < MessagesView > > > QueryMessages ( string searchParam , PagingInfo pagingInfo , SortInfo sortInfo , CancellationToken cancellationToken )
49+ public async Task < QueryResult < IList < MessagesView > > > QueryMessages ( string searchParam , PagingInfo pagingInfo , SortInfo sortInfo , DateTimeRange timeSentRange , CancellationToken cancellationToken )
4950 {
5051 using var session = await sessionProvider . OpenSession ( cancellationToken : cancellationToken ) ;
5152 var results = await session . Query < MessagesViewIndex . SortAndFilterOptions > ( GetIndexName ( isFullTextSearchEnabled ) )
5253 . Statistics ( out var stats )
5354 . Search ( x => x . Query , searchParam )
55+ . FilterBySentTimeRange ( timeSentRange )
5456 . Sort ( sortInfo )
5557 . Paging ( pagingInfo )
5658 . ToMessagesView ( )
@@ -59,13 +61,14 @@ public async Task<QueryResult<IList<MessagesView>>> QueryMessages(string searchP
5961 return new QueryResult < IList < MessagesView > > ( results , stats . ToQueryStatsInfo ( ) ) ;
6062 }
6163
62- public async Task < QueryResult < IList < MessagesView > > > QueryMessagesByReceivingEndpointAndKeyword ( string endpoint , string keyword , PagingInfo pagingInfo , SortInfo sortInfo , CancellationToken cancellationToken )
64+ public async Task < QueryResult < IList < MessagesView > > > QueryMessagesByReceivingEndpointAndKeyword ( string endpoint , string keyword , PagingInfo pagingInfo , SortInfo sortInfo , DateTimeRange timeSentRange , CancellationToken cancellationToken )
6365 {
6466 using var session = await sessionProvider . OpenSession ( cancellationToken : cancellationToken ) ;
6567 var results = await session . Query < MessagesViewIndex . SortAndFilterOptions > ( GetIndexName ( isFullTextSearchEnabled ) )
6668 . Statistics ( out var stats )
6769 . Search ( x => x . Query , keyword )
6870 . Where ( m => m . ReceivingEndpointName == endpoint )
71+ . FilterBySentTimeRange ( timeSentRange )
6972 . Sort ( sortInfo )
7073 . Paging ( pagingInfo )
7174 . ToMessagesView ( )
@@ -74,13 +77,14 @@ public async Task<QueryResult<IList<MessagesView>>> QueryMessagesByReceivingEndp
7477 return new QueryResult < IList < MessagesView > > ( results , stats . ToQueryStatsInfo ( ) ) ;
7578 }
7679
77- public async Task < QueryResult < IList < MessagesView > > > QueryMessagesByReceivingEndpoint ( bool includeSystemMessages , string endpointName , PagingInfo pagingInfo , SortInfo sortInfo , CancellationToken cancellationToken )
80+ public async Task < QueryResult < IList < MessagesView > > > QueryMessagesByReceivingEndpoint ( bool includeSystemMessages , string endpointName , PagingInfo pagingInfo , SortInfo sortInfo , DateTimeRange timeSentRange , CancellationToken cancellationToken )
7881 {
7982 using var session = await sessionProvider . OpenSession ( cancellationToken : cancellationToken ) ;
8083 var results = await session . Query < MessagesViewIndex . SortAndFilterOptions > ( GetIndexName ( isFullTextSearchEnabled ) )
8184 . Statistics ( out var stats )
8285 . IncludeSystemMessagesWhere ( includeSystemMessages )
8386 . Where ( m => m . ReceivingEndpointName == endpointName )
87+ . FilterBySentTimeRange ( timeSentRange )
8488 . Sort ( sortInfo )
8589 . Paging ( pagingInfo )
8690 . ToMessagesView ( )
0 commit comments