redis / redis-om-spring

Spring Data Redis extensions for better search, documents models, and more
MIT License
599 stars 93 forks source link

Aggregation across all records in the database does not work #208

Closed justTimTim closed 1 year ago

justTimTim commented 1 year ago

Hi! When i use Entity Stream for aggregation with filter then i get the result. Code Example entityStream.of(MyClass.class) .filter("@date:[1632776400000 1632862800000]") .groupBy(DwtDoc$.NAME) .reduce(ReducerFunction.COUNT).as("count") .sorted(Sort.Order.desc("@count")) .limit(0, 10) .toList(String.class, Integer.class);

But if I remove the filter, the method returns nothing. Trying the same request in the terminal, I always get a different response something like 1) (integer) 109699 (0.50s)

as I understand it, RediSearch does not allow long aggregations in the database that take longer than 0.5 seconds. It turns out if I have 200-300 thousand records, then I can find the most popular name on it. Weird behavior, How can I fix the problem?

justTimTim commented 1 year ago

FT.CONFIG SET TIMEOUT 1000 or more