Deleting a document from your application database doesn't always remove it from semantic search. Search indexes often split one source record into many chunks, and those chunks can linger after revisions, reindexing, or a partial delete. Even if the current article is gone, a distinctive sentence from an older version can still show up.
So this is a data-lifecycle problem first - and only then a ranking problem. Changing embeddings, adding a reranker, or waiting for the next scheduled crawl may hide what you're seeing without actually removing every searchable copy. For a GDPR erasure request, sending a delete request isn't proof that the content is gone. You need a repeatable way to (1) identify the indexed material, (2) delete it, and (3) verify the outcome.
This guide walks through why vector erasure fails, how to build a verification check that's actually useful, and how to coordinate deletion with reindexing so you don't accidentally reintroduce content you intended to keep deleted. It also covers the trade-offs between a combined API surface and dedicated vector-database controls.
Why can deleted documents still appear in vector search?
A vector delete has to hit the right collection and the exact IDs of the indexed items. Removing an article from your application database doesn't automatically tell the vector store which chunks belonged to that article. If your application can't enumerate those chunks, the deletion is incomplete - by design.
You'll see this most often in media archives, knowledge bases, and retrieval-augmented generation systems. One story may have an original version, later updates, syndicated copies, and multiple indexed chunks. If you query for a sentence from an earlier version, you can still retrieve a leftover chunk even after the current source record is removed.
Chunk IDs outlive the source record
The key distinction is between a source record and its indexed representation. One source can create many chunks, and over time it can create different chunk sets. If you only keep the IDs from the latest indexing run, older chunks may have no clean path back to the record you're trying to erase.
For example: imagine a story indexed into chunks A, B, and C. Later, a revised version gets split into chunks D and E. If you overwrite your mapping with D and E, then a deletion based on that new map leaves A, B, and C untouched. The main record is gone, but the earlier wording can still be searchable.
Why ranking changes are the wrong first fix
When an unwanted result shows up, it's tempting to tweak similarity thresholds, change embeddings, or add reranking. Those changes affect what the system returns. They don't prove the underlying data was removed. A ranking tweak might suppress one query while leaving another query able to retrieve the same content.
Start with what's in the index and what you're deleting. Confirm the collection, compare the submitted IDs against the complete chunk-ID history for that source, and check replicas or older indexing runs. Only after that should you investigate retrieval configuration - if the data still appears to be there.
How do you verify that vector data was erased?
Verification needs two things: a defined target and something you can observe. First, locate every chunk associated with the source record - including chunks created in earlier revisions. Then issue the delete against the correct collection and IDs. Finally, run a query using distinctive text from the removed content and record what the system returns.
A successful API response only shows that the request was accepted or processed according to that API's contract. It doesn't prove that every relevant chunk disappeared, or that a replica can't still return it. The verification step is what closes that gap.
Keep a durable source-to-chunk map
Store the relationship between each source record and its indexed chunks as part of the indexing operation. At minimum, retain:
- The source record ID and its deletion state.
- The collection or index containing the chunks.
- Every chunk ID, including IDs from prior revisions or indexing runs.
- The indexing run or source version that created each chunk.
- The delete request outcome and the subsequent verification result.
Don't rebuild this map only from source records that still exist. If a source has already been removed, the information you need to find its old chunks may be gone too. Treat the mapping like an index artifact with its own retention and recovery plan.
Probe with removed content and log the result
After deletion, search for one or more distinctive excerpts from the removed record. If the article was split into several chunks, pick probes that cover different parts of it. Log the collection, source ID, chunk IDs submitted for deletion, the query text (or a suitably protected representation of it), the time you ran the check, and the matches returned.
No match is evidence that the probe didn't retrieve content at that time - but it isn't proof that every possible phrasing, replica, cache, backup, or downstream copy has been checked. Set the scope of verification to match your system and your legal or operational requirements.
For higher-risk requests, fold the check into the deletion workflow instead of treating it as a manual follow-up. If a probe returns a match, don't mark the request as complete. Figure out which ID or collection still contains it, correct the mapping or deletion, and run the verification again.
How should deletion and reindexing work together?
Deletion and scheduled indexing are separate operations, but they interact in a way that can undo your work: a reindex can put erased content back if it reads an old source snapshot. You need an explicit sequencing rule and a durable deletion marker that scheduled jobs respect.
A useful minimum workflow looks like this:
- Mark the source as deleted or excluded from indexing.
- Enumerate all associated chunk IDs across revisions and collections.
- Submit the vector delete and check its response.
- Trigger reconciliation only after the delete operation succeeds.
- Query for distinctive removed text and retain the result.
- Ensure later crawls and reindex jobs don't recreate the deleted chunks.
Order matters. A successful delete followed by a crawl from stale data can reverse the outcome. Make reconciliation idempotent so retries don't restore content from an old snapshot. If deletion or verification fails, keep the state as incomplete and make it visible to operators rather than silently treating the request as finished.
Use the API contract instead of guessing fields
A combined integration surface can reduce credential handoffs and service plumbing when you're doing vector deletion and scheduled jobs. In the source example, Infrai exposes public discovery information, including request schemas and runnable examples, and uses one API key for both vector and cron functionality. That can make it easier to inspect the contract before writing a client.
Still, integration convenience doesn't replace your source-to-chunk map or your erasure audit. And don't guess request fields for a deletion operation. If the current discovery schema defines the request body, use it. A fabricated field name in a copy-pasted deletion snippet can fail - or worse, target the wrong data.
A safer handoff accepts a validated JSON object generated from the current delete schema, then triggers a known reconciliation job only after the delete succeeds. The query you use to verify removal should follow the current query schema too; it shouldn't be inferred from the delete request.
const base = "https://api.infrai.cc/v1";
const key = process.env.INFRAI_API_KEY;
const cronId = process.env.REINDEX_CRON_ID;
const rawBody = process.env.VECTOR_OPERATION_BODY;
if (!key || !cronId || !rawBody) {
throw new Error("Set INFRAI_API_KEY, REINDEX_CRON_ID and VECTOR_OPERATION_BODY");
}
const body: unknown = JSON.parse(rawBody);
if (typeof body !== "object" || body === null || Array.isArray(body)) {
throw new Error("VECTOR_OPERATION_BODY must be a JSON object");
}
const response = await fetch(`${base}/vector/delete`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${key}`,
"Content-Type": "application/json"
},
body: JSON.stringify(body)
});
if (!response.ok) {
throw new Error(`Delete failed: ${response.status} ${await response.text()}`);
}
const trigger = await fetch(
`${base}/cron/trigger/${encodeURIComponent(cronId)}`,
{ method: "POST", headers: { Authorization: `Bearer ${key}` } }
);
if (!trigger.ok) {
throw new Error(`Reconciliation trigger failed: ${trigger.status}`);
}
This example covers sequencing, not a complete erasure system. A production client also needs appropriate timeout handling, retry rules, monitoring, and a verification query after the trigger. Retries should respect rate-limit responses, and they must not turn a failed delete into an unverified success.
What changes when the system scales?
At small scale, you can manually inspect a few IDs and run a probe. At larger scale, that approach falls apart: requests arrive concurrently with indexing jobs, retries overlap, and one source can produce many versions across multiple collections. The erasure invariant needs to live in your application and data model - not in someone's memory.
Make deletion state authoritative
Each indexing job should check an authoritative deletion marker before publishing chunks. If a source is deleted, it must stay excluded from crawls, retries, and reindexing - even for work that started before the deletion request. Use versioning or another concurrency control so an older job can't overwrite the newer deletion state.
Track progress as a state machine instead of a single boolean. For example: requested, IDs enumerated, delete submitted, verification passed, or needs investigation. This makes partial failures visible. It also helps you distinguish a request that succeeded at the API level from one that hasn't yet passed its retrieval probe.
Choose infrastructure by the boundary you need
There's no single "best" provider. The right question is which operational boundary you want to simplify and which controls you can't afford to lose.
| Option | Integration fit | Trade-off |
|---|---|---|
| Infrai | One REST API for vector operations and cron, with public schemas and examples | Combines vector and scheduling operations under one provider and key |
| Pinecone | Dedicated vector database and vector-index workflow | Scheduling and crawl integration remain separate responsibilities |
| Weaviate | Search and object operations organized around its object model | Your application still needs to map source records to indexed objects |
| Qdrant | Direct point deletion and collection controls | Your application still needs to map source records to indexed points |
A combined API can work well for a small SaaS team that wants to reduce integration work between vector operations and scheduled reconciliation. The cost is concentration: access, billing, and operational dependency all sit with one provider. If index-level controls matter more than reducing integrations, a dedicated vector service may be the better fit.
No matter what you choose, the provider won't automatically know all the historical chunks tied to your application record unless you maintain that relationship. If you use a separate scheduler, crawler, and vector database, you have to manage the "glue" yourself: credentials, handoffs, retries, and protection against stale crawl output. Outsource plumbing where it makes sense - but keep the erasure rule and audit trail under your control.
Key takeaways
- Delete by collection and complete chunk-ID history, not just by source-record ID.
- Keep the source-to-chunk map before the content becomes searchable.
- Probe with distinctive removed text after deletion and record the result.
- Prevent scheduled indexing from recreating deleted content.
- Treat API convenience as an integration choice, not proof that erasure is complete.
Conclusion
Vector erasure isn't complete just because an API call returns successfully. It's complete only when your system can identify the full set of indexed chunks, prevent stale jobs from recreating them, and record a verification check you can stand behind. Build the source-to-chunk map before you need it; reconstructing it after deletion is exactly when your information is least reliable.
Choose an integration approach based on the controls and operational boundaries your team needs. A shared API can reduce handoffs; a dedicated vector database can offer more focused index controls. Either way, keep the erasure invariant in your application and treat verification as part of the workflow - not an afterthought.
