# Deletion (delete\_many with filter) not fully delete all the matched objects

**URL:** <https://forum.weaviate.io/t/deletion-delete-many-with-filter-not-fully-delete-all-the-matched-objects/4169>\
**Category:** Support\
**Created:** [September 16, 2024, 8:36am UTC](https://forum.weaviate.io/t/deletion-delete-many-with-filter-not-fully-delete-all-the-matched-objects/4169 "2024-09-16T08:36:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fairymane](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/fairymane/32/1029_2.png) [@fairymane](https://forum.weaviate.io/u/fairymane)\
**Post date:** [September 16, 2024, 8:36am UTC](https://forum.weaviate.io/t/deletion-delete-many-with-filter-not-fully-delete-all-the-matched-objects/4169/1 "2024-09-16T08:36:25Z")

</div>

### Description

I use the following two option to delete object:

1. 

> log\_name = ‘\*\*’  
> delete\_response = collection.data.delete\_many(  
> where=Filter.by\_property(“log\_name”).equal(log\_name)  
> )

2.\>

> …  
> while not query\_response or (len(query\_response.objects) \> 0 and failed\_batch\_delete\_count \< 5):  
> query\_response = collection.query.fetch\_objects(  
> filters=Filter.by\_property(“log\_date”).equal(log\_date.replace(tzinfo=timezone.utc)),  
> limit=batch\_size,  
> )  
> if len(query\_response.objects) \> 0:  
> delete\_response = collection.data.delete\_many(  
> where=Filter.by\_id().contains\_any([object.uuid for object in query\_response.objects]),  
> )  
> …

In both cases, it seems not all the objects match the filter conditions were deleted, a.k.a there would be some object matches the filter remains:  
query\_response = collection.query.fetch\_objects(  
filters=Filter.by\_property(“log\_date”).equal(log\_date.replace(tzinfo=timezone.utc)),  
limit=batch\_size,  
)  
would still return some matched objects.

What is the problem? Is the index apply to all the properties?

Note this does not happen when the collection size is small, e.g. ~ 1M  
But happens when collection size is large, e.g. ~200M.

### Server Setup Information

- Weaviate Server Version: v17.0.0
- Deployment Method: k8s
- Multi Node? Number of Running Nodes: 7
- Client Language and Version: 4.7.1
- Multitenancy?: No

### Any additional Information

---

<div class="post-metadata">

**Author:** ![andrewisplinghoff](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/andrewisplinghoff/32/1853_2.png) [@andrewisplinghoff](https://forum.weaviate.io/u/andrewisplinghoff)\
**Post date:** [September 16, 2024, 5:49pm UTC](https://forum.weaviate.io/t/deletion-delete-many-with-filter-not-fully-delete-all-the-matched-objects/4169/2 "2024-09-16T17:49:06Z")

</div>

This sounds a bit similar to the issue [Some objects not readable after batch import / flush and switch failed - Support - Weaviate Community Forum](https://forum.weaviate.io/t/some-objects-not-readable-after-batch-import-flush-and-switch-failed/2991) we are having from time to time. Could you try if in your case the affected objects are retrievable when using the same filter as in your delete? Also, it would be interesting if you encounter similar errors in the logs as in that ticket. If possible, also try restarting the Weaviate instances to see if that allows for the objects to be found again as that helped in our case.

Also I saw you are using a very old Weaviate version, is there a reason for that?
