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).
Indexes created before the namespaces feature can still be used as they are,
without modification. All operations are assumed to use the default 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.
from upstash_vector import Indexindex = Index( url="UPSTASH_VECTOR_REST_URL", token="UPSTASH_VECTOR_REST_TOKEN",)index.delete_namespace("ns")
from upstash_vector import Indexindex = Index( url="UPSTASH_VECTOR_REST_URL", token="UPSTASH_VECTOR_REST_TOKEN",)index.delete_namespace("ns")
import { Index } from "@upstash/vector"const index = new Index({ url: "UPSTASH_VECTOR_REST_URL", token: "UPSTASH_VECTOR_REST_TOKEN",})await index.deleteNamespace("ns")
use Upstash\Vector\Index;$index = new Index( url: 'UPSTASH_VECTOR_REST_URL', token: 'UPSTASH_VECTOR_REST_TOKEN',);$index->namespace('ns')->deleteNamespace();
All active namespaces can be listed by using the
List Namespaces API.
from upstash_vector import Indexindex = Index( url="UPSTASH_VECTOR_REST_URL", token="UPSTASH_VECTOR_REST_TOKEN",)index.list_namespaces()
from upstash_vector import Indexindex = Index( url="UPSTASH_VECTOR_REST_URL", token="UPSTASH_VECTOR_REST_TOKEN",)index.list_namespaces()
import { Index } from "@upstash/vector"const index = new Index({ url: "UPSTASH_VECTOR_REST_URL", token: "UPSTASH_VECTOR_REST_TOKEN",})await index.listNamespaces()