Fetch records by ID
To fetch records from a namespace based on their IDs, use thefetch operation with the following parameters:
namespace: The namespace containing the records to fetch. To use the default namespace, set this to"__default__".ids: The IDs of the records to fetch. Maximum of 1000.
For on-demand indexes, since vector values are retrieved from object storage, fetch operations may have increased latency. If you only need metadata or IDs, consider using the
query operation with include_values set to false instead. See Decrease latency for more details.Fetch records by metadata
To fetch records from a namespace based on their metadata values, use thefetch_by_metadata operation with the following parameters:
| Parameter | Required | Description |
|---|---|---|
filter | Yes | A metadata filter expression describing the records to fetch. Must be present and non-empty. |
limit | No | The maximum number of matching records to return in a single response. Defaults to 100; maximum 10,000. To retrieve more than 10,000 matching records, paginate using paginationToken. |
namespace | No | The namespace containing the records to fetch. If omitted or set to an empty string, defaults to the default namespace. To explicitly use the default namespace, set this to "__default__". |
paginationToken | No | The next token value from the pagination object found in a previous response. Include this value to fetch the next page of results, or omit it to start from the beginning. Must be used with the same namespace and filter parameters that generated it — using an existing token with different parameters will return incorrect results. |
genre field set to Action/Adventure from the default namespace:
pagination object with a next token. When there are no more results, the response does not include a pagination object.
Fetch limits
Fetch by ID limits:| Metric | Limit |
|---|---|
| Max IDs per request | 1000 IDs |
| Max request size | N/A |
| Max request rate | 100 requests per second per index |
| Metric | Limit |
|---|---|
| Max records per response | 10,000 records |
| Max response size | 4 MB |
| Max request rate | 5 requests per second per namespace |
paginationToken parameter. See Fetch records by metadata.