My weaviate cluster is quickly approaching it’s resource limits, and as the cluster admin I’d like to see all of the classes in the Cluster, and their relative sizes to find out what needs to be purged.
Can I do this from the Weaviate API?
Re. the reply I received in Slack - I’m aware of collection counts via Aggregate but my point was more about if I wanted to see an overview of the entire cluster, and which collections are using up the most resources etc.
So far I just wrote a script which called the above code for each collection in the schema.
import weaviate
client = weaviate.Client("REDACTED")
classes = [d["class"] for d in client.schema.get()["classes"]]
for class_name in classes:
class_size = client.query.aggregate(class_name).with_meta_count().do()
print(class_size["data"])
Note that this only shows the number of objects in each class, not how large each of those objects are, so it’s not a perfect solution to finding out who is using up the most resources.
If anyone has a better approach, I’d love to see it!