Skip to navigation

Delete Record

Delete one record. It leaves search results, browse totals and Get Records within about a second. To delete several, use Update Records with delete.

Authentication

AuthorizationBearer

A write key, issued by Captain. Server side only. Sent as Authorization: Bearer <key>.

Path parameters

indexstringRequiredformat: "^[a-z0-9][a-z0-9_-]{0,47}$"
index name
record_idstringRequired

Headers

Idempotency-KeystringOptional<=255 characters

Replays within 24 hours return the stored response (header Idempotent-Replayed: true). The same key on a different request answers 422. A concurrent duplicate answers 409. Failed requests do not keep the key.

Response headers

X-Captain-Applied-Seqinteger

the last update seq search had applied when this request started; the answer reflects at least that much (GET …/updates applied_seq). Not on 401 or 403, nor for an index this server does not have

X-Captain-Index-IncarnationstringOptional

the index’s incarnation, an opaque string: it changes only when the index is deleted and created again (whose seqs start again at 1), or restored from a backup (whose seqs continue from the backup’s). Sent with X-Captain-Applied-Seq

X-Captain-Seqinteger
this write's seq, the same number as seq in the body

Response

accepted
job_idstringOptional

the write job this change belongs to (GET /v1/jobs/{job_id}); writes to one index with one key within 250 ms share a job

live_updatesenumOptional
Live updates apply only on the region that accepted them.
Allowed values:
regions_appliedlist of stringsOptional

The region where this update applies, within about a second (GET …/updates shows when).

regions_pendinglist of stringsOptional
Regions without this update until the index's next build is published and restored there.
replicates_on_next_buildbooleanOptional

True when builds are published to every region: the next build started after this update carries it everywhere (one accepted while a build runs waits for the build after).

indexstringOptional
seqintegerOptional
accepted_atdoubleOptional
updatedintegerOptional
deletedintegerOptional
servedbooleanOptional

true when this change applies to the served index within about a second; false when the index has no served build yet, or any record in waiting_for_build

not_foundlist of stringsOptional

ids (in records or delete) that the index doesn’t have, skipped rather than refused (the first 100). updated and deleted count only the records changed. Delete Record lists its id here when the index doesn’t have it.

not_found_countintegerOptional
how many ids were skipped, past the first 100 too
readdedlist of stringsOptional

ids (the first 100) whose update named a text or children field: merged into the stored record and added again, searchable when that add is

readded_countintegerOptional
waiting_for_buildlist of stringsOptional

ids (the first 100) of records that are added but not yet built: this change reaches them with their build, not within a second

waiting_for_build_countintegerOptional

how many records are in waiting_for_build, past the first 100 too

stale_until_buildlist of stringsOptional
fields updated for filters, facets and sort at once, whose words keyword search matches only after the next build
stale_features_until_buildlist of enumsOptional

what still reflects the data before this update until the next build: typeahead, spelling and search_evidence (the no-typed-word answer) keep a deleted record’s words and do not learn a changed value’s words; hit_display: values shown on hits from the record’s mapped roles (rating, price, title…). Filters, sort, facets, hit.fields and GET change at once

Allowed values: