redisearch-py icon indicating copy to clipboard operation
redisearch-py copied to clipboard

WITHSCHEMA option does not exist in RediSearch 2.0.6

Open abrookins opened this issue 4 years ago • 0 comments
trafficstars

The following query raises a ResponseError:

In [50]: from redisearch.aggregation import AggregateRequest, Asc
    ...: 
    ...: req = AggregateRequest('*').group_by(
    ...:     ['@published_year'], reducers.avg('average_rating').alias('average_rating_for_year')
    ...: ).sort_by(
    ...:     Asc('@average_rating_for_year')
    ...: ).limit(0, 10).filter('@published_year > 0').with_schema()

In [51]: resp = c.aggregate(req)

....

ResponseError: Unknown argument `WITHSCHEMA` at position 1 for <main>

This option does not appear in our docs on FT.AGGREGATE. Is it a new feature or an old one, I wonder?

abrookins avatar Apr 26 '21 19:04 abrookins