A document is a JSON object that matches your index schema. Every document
has a stable id you provide — Skryx uses it for upserts, deletes, and the
get-by-id endpoint.
# Required fields
id— string. Stable identifier in your system. Skryx upserts byid.- Plus every field your schema declares as required.
# Optional fields
Anything declared in the schema as optional: true can be omitted. Unknown
fields (not in the schema) are rejected with SK-SE-400.
# How big can a document be?
Skryx accepts documents up to 1 MB each, but you'll typically have much smaller ones (a product line is normally a few KB). If you have long text fields (descriptions, articles), store them — Skryx tokenises and indexes them efficiently — but consider chunking articles into paragraphs that each get their own document for better highlight quality.
# Re-indexing
POST /v1/indexes/{name}/documents/batch is idempotent on id. To do a
full re-index, send all your documents in batches of 1,000 with
action: "upsert". To do a replace (delete anything not in the new feed),
use a data source with sync_mode: "replace".
# Eventually consistent reads
Document writes propagate to read replicas within a few hundred milliseconds.
For most products this is irrelevant, but it means a GET document issued
immediately after an upsert can occasionally 404. Retry once.