Open DeepAndy opened 4 years ago
Works ok if redisearch-py installed from sources
I encountered a similar problem where it would work fine but vscode would show aggregation
as undefined. So I downloaded the aggregation module from src and imported from there, rather than from installed redisearch by pip3. And it would show no problem.
This thing definitely has some problems deep inside. Did you figure it out what happened in your case?
Fixes for aggregation were released in version 0.8.0
check again with this new version in pypi, it's probably resolved now
Given the current version (2.0.0), the example code above should still produce an AttributeError.
The redisearch
module doesn't expose the aggregation
submodule in its __init__.py
file, so it's not available as an attribute of the module. Explicitly importing the submodule should fix it.
import redisearch.aggregation
# or `from redisearch import aggregation`
aggregate_request = redisearch.aggregation.AggregateRequest()
Aggregation doesn't work if installed by 'pip install redisearch'