Description
I keep getting an error when trying to run a query against the Weavaite cloud:
AttributeError: '_QueryCollection' object has no attribute 'aggregate'
I am lost as to what could be causing it as I have checked the documentation and done all the updates I could.
The code that I am running:
# Establish a connection to Weaviate Cloud
client = weaviate.connect_to_weaviate_cloud(
cluster_url="",
auth_credentials=weaviate.AuthApiKey(api_key="")
)
collection = client.collections.get("Test")
# Get collection specific to the required tenant
multi_tenants = collection.with_tenant("test")
multi_tenants.query.aggregate("Test") \
.with_where({
"path": ["document_name"],
"operator": "Equal",
"valueString": "document1"
}) \
.with_tenant(tenant_id) \
.with_fields("date_loaded { minimum maximum }") \
.do()
Server Setup Information
- Weaviate Server Version: Weaviate Cloud
- Deployment Method:
- Multi Node? Number of Running Nodes:
- Client Language and Version: Python 3.11, Weaviate v.4.8.1
- Multitenancy