# Diagnosis

## Symptom

`index.delete(filter={...})` returns without error, but subsequent queries still return the records.

## Likely cause

Causes in order: wrong namespace (deleted from the default namespace, records live in another), filter matches nothing (same type/name pitfalls as query filters), or the call targeted the wrong index.

## Confirm it

1. Fetch one record you expected deleted; print its namespace and metadata.
2. Run a query with the same filter: if it returns records, the filter works and the delete did not target them (namespace/index wrong). If it returns nothing, the filter itself matches nothing.
3. `describe_index_stats()` per namespace before and after the delete to see which namespace count moved.

## Fix

1. Pass the correct namespace explicitly on the delete call.
2. Fix the filter using the fetch output as ground truth.
3. For full-namespace wipes use `delete_all` with the namespace; it is unambiguous.

## Verify the fix

Query after delete and assert the records are gone; check stats counts dropped by the expected number.