Transition legacy Vectorize indexes
Legacy Vectorize (V1) indexes are on a deprecation path as of Aug 15, 2024. Your Vectorize index may be a legacy index if it fulfills any of the follwing crieria:
- Was created with a Wrangler version lower than
v3.71.0
. - Was created using the "--deprecated-v1" flag enabled.
- Was created using the legacy REST API.
This document provides details around any transition steps that may be needed to move away from legacy Vectorize indexes.
Legacy Vectorize (V1) indexes are on a deprecation path. Support for these indexes would be limited and their usage is not recommended for any production workloads.
Furthermore, you will no longer be able to create legacy Vectorize indexes by December 2024. Other operations will be unaffected and will remain functional.
Additionally, the new Vectorize (V2) indexes can operate at a significantly larger scale (with a capacity for multi-million vectors), and provide faster performance. Please review the Limits page to understand the latest capabilities supported by Vectorize.
In addition to supporting significantly larger indexes with multi-million vectors, and faster performance, these are some of the changes that need to be considered when transitioning away from legacy Vectorize indexes:
-
The new Vectorize (V2) indexes now support asynchronous mutations. Any vector inserts or deletes, and metadata index creation or deletes may take a few seconds to be reflected.
-
Vectorize (V2) support metadata and namespace filtering for much larger indexes with significantly lower latencies. However, the fields on which metadata filtering can be applied need to be specified before vectors are inserted. Refer to the metadata index creation page for more details.
-
Vectorize (V2) query operation now supports the ability to search for and return up to 100 most similar vectors.
-
Vectorize (V2) query operations provide a more granular control for querying metadata along with vectors. Refer to the query operation page for more details.
-
Vectorize (V2) expands the Vectorize capabilities that are available via Wrangler (with Wrangler version >
v3.71.0
).
-
Wrangler now supports operations on the new version of Vectorize (V2) indexes by default. To use Wrangler commands for legacy (V1) indexes, the
--deprecated-v1
flag must be enabled. Please note that this flag is only supported to create, get, list and delete indexes and to insert vectors. -
Refer to the REST API page for details on the routes and payload types for the new Vectorize (V2) indexes. For legacy (V1) index operations, refer to Deprecated REST API.
-
To use the new version of Vectorize indexes in Workers, the environment binding must be defined as a
Vectorize
interface.The
Vectorize
interface includes the type changes and the capabilities supported by new Vectorize (V2) indexes.For legacy Vectorize (V1) indexes, use the
VectorizeIndex
interface. -
With the new Vectorize (V2) version, the
returnMetadata
option for the query operation now expects eitherall
,indexed
ornone
string values. For legacy Vectorize (V1), thereturnMetadata
option was a boolean field. -
With the new Vectorize (V2) indexes, all index and vector mutations are asynchronous and return a
mutationId
in the response as a unique identifier for that mutation operation.These mutation operations are: Vector Inserts, Vector Upserts, Vector Deletes, Metadata Index Creation, Metadata Index Deletion.
To check the identifier and the timestamp of the last mutation processed, use the Vectorize Info command.