Upstash Documentation

Namespaces

2 min read

Upstash Vector allows you to partition a single index into multiple isolated namespaces. Each namespace acts as a self-contained subset of the index, and read and write requests are limited to one namespace.

Each vector index has at least one default namespace and optionally many more.

If no namespace is specified, the operations will use the default namespace, which has the name "" (empty string).

Note

Indexes created before the namespaces feature can still be used as they are, without modification. All operations are assumed to use the default namespace.

Using a Namespace#

Namespaces are created implicitly when an upsert operation is performed, so there is no specific endpoint for creating a namespace.

For example, the code snippet below will create the namespace ns if it does not already exist, upsert and query the vector only on that namespace.

Under the hood, when using a namespace, your requests are sent to <vector-url>/<command>/namespace-name to only be executed only against that namespace.

Deleting a Namespace#

Namespaces can be deleted by using the Delete Namespace API.

Listing Namespaces#

All active namespaces can be listed by using the List Namespaces API.