File tree Expand file tree Collapse file tree
nativelink-store/src/redis_utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,13 @@ use tracing::error;
2323use crate :: redis_utils:: aggregate_types:: RedisCursorData ;
2424use crate :: redis_utils:: ft_cursor_read:: ft_cursor_read;
2525
26+ /// Maximum rows `FT.AGGREGATE` may return in total (across all cursor reads).
27+ ///
28+ /// RediSearch applies an implicit **`LIMIT 0 10`** when `LIMIT` is omitted, which capped
29+ /// [`crate::redis_store::RedisStore::search_by_index_prefix`] (and thus scheduler
30+ /// `get_queued_actions`) at 10 documents regardless of `WITHCURSOR` batch size.
31+ const FT_AGGREGATE_MAX_TOTAL_RESULTS : i64 = 2147483648 ;
32+
2633#[ derive( Debug ) ]
2734pub ( crate ) struct FtAggregateCursor {
2835 pub count : u64 ,
6067 . arg ( "LOAD" )
6168 . arg ( options. load . len ( ) )
6269 . arg ( & options. load )
70+ // Override RediSearch default LIMIT 0 10 (see `FT_AGGREGATE_MAX_TOTAL_RESULTS`).
71+ . arg ( "LIMIT" )
72+ . arg ( 0_i64 )
73+ . arg ( FT_AGGREGATE_MAX_TOTAL_RESULTS )
6374 . arg ( "WITHCURSOR" )
6475 . arg ( "COUNT" )
6576 . arg ( options. cursor . count )
You can’t perform that action at this time.
0 commit comments