await index.fetch(["2", "3"]);
// [{ id: "2" }, { id: "3" }]
Used to retrieve the vector by ID.

Arguments

IDs
string[] | number[]
required
The IDs of the vectors you want to fetch.
OR
FetchPayload
object
required
Options
Object

Response

FetchResult[]
Vector[]
required
This field is null if no vector with the specified id is found.
await index.fetch(["2", "3"]);
// [{ id: "2" }, { id: "3" }]