Upstash Documentation

Range Vectors

Ranges over vectors starting(inclusive) from a cursor until the end of the vectors in the or given limit.
2 min read
gethttps://{endpoint}/range/{namespace}
gethttps://{endpoint}/range/{namespace}
Tip

By default vectors from the default namespace will be iterated. You can use a different namespace by specifying it in the request path.

Request#

cursorstringrequired#

The offset to the last retrieved vector. Should be set to "0" in the initial range.

prefixstring#

Prefix of the vector ids to range over.

limitnumberrequired#

The number of maximum vectors that you want in the response of range. (page size)

includeMetadataboolean#

Whether to include the metadata of the vectors in the response, if any. It is recommended to set this to true to easily identify vectors.

Default: "false"

includeVectorsboolean#

Whether to include the vector values in the response. It is recommended to set this to false as the vector values can be quite big, and not needed most of the time.

Default: "false"

includeDataboolean#

Whether to include the data of the vectors in the response, if any.

Default: "false"

Path#

namespacestring#

The namespace to use. When no namespace is specified, the default namespace will be used.

Default: ""

Response#

nextCursorstringrequired#

The offset for the next range. You should place this in the cursor field for the next range. It will be equal to empty string if there are no other vectors to range.

vectorsObject[]required#
Show properties
idstringrequired#

The id of the vector.

vectornumber[]#

The dense vector value for dense and hybrid indexes.

sparseVectorObject[]#

The sparse vector value for sparse and hybrid indexes.

Show properties
indicesnumber[]#

Indices of the non-zero valued dimensions.

valuesnumber[]#

Values of the non-zero valued dimensions.

metadataObject#

The metadata of the vector, if any.

datastring#

The unstructured data of the vector, if any.