doc_id and its source text.
The examples use the environment variables configured in the quickstart.
Choose stable IDs
doc_id identifies a document within an index. Sending the same ID again replaces the existing document, so use an ID from your source system rather than a title, URL, or content hash.
This replacement behavior also makes an upload safe to repeat after a timeout.
Check every response
An upload can return HTTP 200 even when individual documents fail:failed. Correct failed documents before sending them again.
Limits
- 50 documents per request
- 100 KiB of UTF-8 text per document
- 255 characters per
doc_id - 5 MiB for the complete JSON request