Arguments
string[] | number[]
required
The IDs of the vectors you want to fetch.
object
required
Object
Response
Vector[]
required
This field is
null if no vector with the specified id is found.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
await index.fetch(["2", "3"]);
// [{ id: "2" }, { id: "3" }]
await index.fetch(["2", "3"]);
// [{ id: "2" }, null]
await index.fetch({ prefix: "test-" });
// [{ id: "test-1" }, { id: "test-2" }, { id: "test-3" }]
Hide child attributes
true would be the best practice, since it will make it easier to
identify the vectors.null if no vector with the specified id is found.Hide child attributes
includeVectors is set to true)includeVectors is set to true)includeMetadata is set to true)includeData is set to true)await index.fetch(["2", "3"]);
// [{ id: "2" }, { id: "3" }]
await index.fetch(["2", "3"]);
// [{ id: "2" }, null]
await index.fetch({ prefix: "test-" });
// [{ id: "test-1" }, { id: "test-2" }, { id: "test-3" }]
Was this page helpful?