Commands
Fetch
Used to retrieve the vector by ID.
Arguments
IDsstring[] | number[]required
The IDs of the vectors you want to fetch.
OR
FetchPayloadobjectrequired
OptionsObject
Response
FetchResult[]Vector[]required
This field is null if no vector with the specified id is found.
Basic
await index.fetch(["2", "3"]);// [{ id: "2" }, { id: "3" }]Vector Not Found
await index.fetch(["2", "3"]);// [{ id: "2" }, null]ID prefix
await index.fetch({ prefix: "test-" });// [{ id: "test-1" }, { id: "test-2" }, { id: "test-3" }]