All Products
Search
Document Center

Elasticsearch:Vector cluster recall

Last Updated:Sep 21, 2026

Vector cluster recall selects candidate clusters before documents are retrieved, which reduces read and compute overhead and helps you control query latency. In Alibaba Cloud Elasticsearch Agent Engine Edition, vector cluster recall applies to large-scale vector stores that have completed offline clustering. A vector cluster is a group of documents with similar vectors, and a centroid vector represents the characteristics of that cluster.

Scenarios

Important

You run the offline clustering, assign clusters to documents, and maintain the centroid vectors as your data changes. Alibaba Cloud Elasticsearch Agent Engine Edition does not train clustering models, and it does not decide the write location based on document vectors.

Business condition

Recommendation

The tenant, knowledge base, or code repository is known before the query

Use namespace mode to specify the business scope directly.

Offline clustering is complete, the target cluster is unknown before the query, and the data volume is large

Use vector cluster recall to select candidate clusters based on the query vector.

Reliable cluster centroids cannot be maintained, or the data volume is small and the cost of querying directly is acceptable

Start with a standard index or namespace mode. No additional cluster management is required.

The query must cover all data within a specified scope

Use namespace mode or a standard index for that scope instead of relying on candidate cluster selection.

Limits

The following limits apply to vector cluster recall:

  • Collection mode — Specify vector cluster mode when you create a Collection. An existing Collection cannot switch modes.

  • Centroid similarity metric — Cluster selection by centroid vector always uses cosine similarity. Document vectors can use the similarity metric that your model requires.

How the query scope narrows

In vector cluster recall, each vector cluster corresponds to one Slice. You register the Slice and its centroid vector, and then write documents to that Slice. At query time, the system runs an approximate search based on the cosine similarity between the query vector and the cluster centroids to select the candidate Slices. The system then runs KNN only within the selected Slices. Whether that KNN search is approximate depends on the query method that you use.

Clusters that are not selected do not take part in the query. A larger number of candidate clusters usually improves recall, but it also increases read and compute overhead. Determine the candidate count by testing recall, latency, and resource usage against your real data.

Vector cluster recall and DiskBBQ

Vector cluster recall and DiskBBQ work at different levels. Vector cluster recall decides which Slices to access, and Sliced DiskBBQ retrieves document vectors within the selected Slices, which reduces the read and compute overhead from irrelevant vectors. Basic DiskBBQ lowers the resident memory footprint of vector retrieval. For details about how the two levels divide responsibilities, see DiskBBQ and Sliced DiskBBQ vector retrieval.

Vector cluster recall is not a prerequisite for using DiskBBQ or KNN. Standard indexes and namespace mode also support vector retrieval.

Next steps

For configuration, centroid vector registration, and runnable examples, see Vector cluster recall reference.