Skip to content

Commit 2a536ea

Browse files
authored
[Vectorize] changelog entry: Return up to 50 query results with values or metadata (cloudflare#29006)
1 parent 92705f6 commit 2a536ea

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Return up to 50 query results with values or metadata
3+
description: Vectorize increases the `topK` limit to 50 when queries return values or full metadata.
4+
products:
5+
- vectorize
6+
date: 2026-03-16
7+
---
8+
9+
You can now set `topK` up to `50` when a Vectorize query returns values or full metadata. This raises the previous limit of `20` for queries that use `returnValues: true` or `returnMetadata: "all"`.
10+
11+
Use the higher limit when you need more matches in a single query response without dropping values or metadata. Refer to the [Vectorize API reference](/vectorize/reference/client-api/) for query options and current `topK` limits.

src/content/docs/vectorize/platform/limits.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To request an adjustment to a limit, complete the [Limit Increase Request Form](
2020
| Precision per vector dimension | 32 bits (float32) |
2121
| Maximum vector ID length | 64 bytes |
2222
| Metadata per vector | 10KiB |
23-
| Maximum returned results (`topK`) with values or metadata | 20 |
23+
| Maximum returned results (`topK`) with values or metadata | 50 |
2424
| Maximum returned results (`topK`) without values and metadata | 100 |
2525
| Maximum upsert batch size (per batch) | 1000 (Workers) / 5000 (HTTP API) |
2626
| Maximum vectors in a list-vectors page | 1000 |

src/content/docs/vectorize/reference/client-api.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ let matches = await env.YOUR_INDEX.query(queryVector, {
6767

6868
#### topK
6969

70-
The `topK` can be configured to specify the number of matches returned by the query operation. Vectorize now supports an upper limit of `100` for the `topK` value. However, for a query operation with `returnValues` set to `true` or `returnMetadata` set to `all`, `topK` would be limited to a maximum value of `20`.
70+
The `topK` can be configured to specify the number of matches returned by the query operation. Vectorize now supports an upper limit of `100` for the `topK` value. However, for a query operation with `returnValues` set to `true` or `returnMetadata` set to `all`, `topK` is limited to a maximum value of `50`.
7171

7272
#### returnMetadata
7373

7474
The `returnMetadata` field provides three ways to fetch vector metadata while querying:
7575

7676
1. `none`: Do not fetch metadata.
7777
2. `indexed`: Fetched metadata only for the indexed metadata fields. There is no latency overhead with this option, but long text fields may be truncated.
78-
3. `all`: Fetch all metadata associated with a vector. Queries may run slower with this option, and `topK` would be limited to 20.
78+
3. `all`: Fetch all metadata associated with a vector. Queries may run slower with this option, and `topK` is limited to 50.
7979

8080
:::note[`topK` and `returnMetadata` for legacy Vectorize indexes]
8181

@@ -233,9 +233,9 @@ Vectorize indexes are bound by name. A binding for an index named `production-do
233233
"vectorize": [
234234
{
235235
"binding": "PROD_SEARCH", // the index will be available as env.PROD_SEARCH in your Worker
236-
"index_name": "production-doc-search"
237-
}
238-
]
236+
"index_name": "production-doc-search",
237+
},
238+
],
239239
}
240240
```
241241

0 commit comments

Comments
 (0)