Release [email protected] · cloudflare/wor...

Vectorize V2 is in public beta. As long as you have access to Vectorize and use the latest version of Wrangler https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%403.71.0 you should have access to Vectorize V2.
GitHub
Release [email protected] · cloudflare/workers-sdk
Minor Changes #6464 da9106c Thanks @AnantharamanSI! - feat: rename --count to --limit in wrangler d1 insights This PR renames wrangler d1 insight's --count flag to --limit to improve clarity ...
9 Replies
steyblind
steyblind6mo ago
attempting to delete vector via REST api results in this error:
{
"result": null,
"success": false,
"errors": [
{
"code": 1010,
"message": "vectorize.incorrect_api_version - Index: \"echo-context\" with version \"v1\" called with api version \"v2\""
}
],
"messages": []
}
{
"result": null,
"success": false,
"errors": [
{
"code": 1010,
"message": "vectorize.incorrect_api_version - Index: \"echo-context\" with version \"v1\" called with api version \"v2\""
}
],
"messages": []
}
Do I need to re-create my index?
yevgen
yevgenOP6mo ago
We are looking into this and get back to you soon.
garvitg
garvitg6mo ago
Hi @steyblind. With Wrangler v3.71.0, Vectorize V2 indexes have become the default, and you would need to use the "--deprecated-v1" flag to interact with the legacy V1 indexes (all indexes created using an older wrangler version). You should be able to delete that index with the "--deprecated-v1" flag set to true.
steyblind
steyblind6mo ago
all righty then
steyblind
steyblind6mo ago
OK, so I wanted to delete a single vector by Id. I deleted the index, re-created it (v2 now) and I'm not sure my workers can even see it now???
No description
No description
No description
steyblind
steyblind6mo ago
Same code, new index (same name), forced a fresh deploy
Error: VECTOR_QUERY_ERROR (code = 40026): Failed to parse the request body as JSON: returnMetadata: expected value at line 1 column 19
at VectorizeIndexImpl._send (cloudflare-internal:vectorize-api:151:23)
at async VectorizeIndexImpl.query (cloudflare-internal:vectorize-api:37:25)
at async CFVectorize.query (file:///Users/pk2/Code/cfw-responder/.wrangler/tmp/dev-oyoqfU/index.js:12462:20)
Error: VECTOR_QUERY_ERROR (code = 40026): Failed to parse the request body as JSON: returnMetadata: expected value at line 1 column 19
at VectorizeIndexImpl._send (cloudflare-internal:vectorize-api:151:23)
at async VectorizeIndexImpl.query (cloudflare-internal:vectorize-api:37:25)
at async CFVectorize.query (file:///Users/pk2/Code/cfw-responder/.wrangler/tmp/dev-oyoqfU/index.js:12462:20)
request body
{
"returnMetadata": true,
"returnValues": false,
"namespace": "echo-00e62",
"filter": {
"topic": "contact"
},
"topK": 1
}
{
"returnMetadata": true,
"returnValues": false,
"namespace": "echo-00e62",
"filter": {
"topic": "contact"
},
"topK": 1
}
garvitg
garvitg6mo ago
Vectorize V2 now allows for more granular options to fetch metadata while querying vectors. The returnMetadata field is no longer a boolean, but expects a string with options "none", "indexed" or "all". I hope that fixes your query. The changes in the documentation are in review and are coming up very soon: https://github.com/cloudflare/cloudflare-docs/pull/15916
GitHub
[Vectorize] update docs for Vectorize V2 by sejoker · Pull Request ...
Summary Vectorize V2 changes: use of Wrangler prerelease version wrangler commands for metadata index operations updated V2 limits added recommendation for vectors bulk upload
steyblind
steyblind6mo ago
thank you, I’ll check the docs GitHub in the future for bleeding edge changes like this. Appreciate it
garvitg
garvitg6mo ago
We appreciate your feedback! Please feel free to reach out for any support that we can provide!

Did you find this page helpful?