In OpenSearch Vector Search Edition, the vector cache feature reduces resource consumption and cost using a cache table to avoid repeated vectorization. When data is written, the system automatically checks whether field content has changed and only recomputes vectors for changed data, significantly lowering model invocation volume.
How it works
Each time data is written, the system processes vector fields as follows:
Use the value of the Vector ID Field to look up a matching record in the cache table.
If a match is found (cache hit), read the existing vector value from the cache table and write it to the vector field in the current table.
If no match is found (cache miss), call the vector model in real time to compute the vector value and write it to the vector field in the current table.
The vector identifier field is typically a unique ID generated from business information—such as field content, vector model name, and vector dimensions—to determine whether the input for vectorization or the model itself has changed.
Limits
Processing flow limits
Single-step processing: Only vector fields with one processing step are supported.
Multi-step chained processing is not supported: For example, workflows like OCR detection followed by vectorization cannot use caching.
Supported templates and models
Applicable templates: Only “Text Dense Vectorization,” “Image Vectorization,” and “Fusion Vector” are supported.
Model requirements: Built-in vectorization models do not support caching. To use caching, switch to a model provided by the AI Search Open Platform or Model Studio.
Field and table schema requirements
Field type: The vector identifier field and the cache table’s associated field must both be of type String.
Instance consistency: The cache table must reside in the same instance as the current data table.
Resource impact assessment
Increased traffic: Enabling caching requires querying the online cluster for vectors, which increases online cluster traffic. The increase depends on your data update volume.
Recommendation: Evaluate and scale out query nodes and data nodes based on your expected data update frequency.
The vector identifier field is typically a unique ID generated from business information—such as field content, vector model name, and vector dimensions—to detect whether vectorization inputs for the same record have changed between update batches.
Limits
Only vector fields involving one processing step are supported. Multi-step chains (such as OCR followed by vectorization) do not support vector caching.
Only the following data processing templates are supported: Text Dense Vectorization, Image Vectorization, and Fusion Vector.
Built-in vectorization models do not support vector caching. Use models from the AI Search Open Platform or Model Studio instead.
The vector identifier field and the cache table’s associated field must be of type String.
The cache table must belong to the same instance as the current table.
Configure vector cache
After configuring data processing for a vector field during table creation or modification in the Field Configuration stage, enable vector caching.
On the field configuration page, complete data processing setup for the field to be vectorized (for example, select the Text Dense Vectorization template and its corresponding model).
In the service list of the data processing configuration panel, click Vector Cache next to the generated field to open the vector cache configuration dialog box.
In the service list of the data processing configuration panel, click Vector Cache next to the generated field to open the vector cache configuration dialog box.
Configure parameters for the current table:
Parameter
Description
Vector Field
The destination field where vectors are written directly on cache hit or after real-time model computation on cache miss. Select a vector field from the current table.
The destination field where vectors are written directly on cache hit or after real-time model computation on cache miss. Choose from the current table’s vector fields.
Vector ID Field
The unique identifier used to match records in the cache table. It is usually generated from business information such as field content, vector model, and vector dimensions. Only String-type fields can be selected.
Configure parameters for the cache table:
Parameter
Description
Table Name
Select a table from the same instance to serve as the cache table.
Vector ID Field
The associated field in the cache table that corresponds to the current table’s vector identifier field. Only String-type fields can be selected.
Vector Field
The field in the cache table that stores vector values. On cache hit, this field’s value is read and written to the current table’s vector field.
Click OK to complete vector cache configuration.
Cache table design recommendations
The cache table must be created in advance and include the following fields:
The cache table must be created in advance and include the following fields:
A String-type identifier field storing values in the same format as the current table’s vector identifier field.
A multi-value Float-type vector field storing precomputed vector values.
Cache table data usually comes from historical records that have already been vectorized. After a table’s data is processed by a vector model, store the vector identifier and its corresponding vector value in the cache table for reuse during future updates.