# Source: https://upstash.com/docs/search/features/indexes.md

> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Indexes

Upstash Search allows you to partition a single database into multiple isolated indexes.
Each index acts as a self-contained subset of the database,
search and upsert requests are limited to one index.

***

## Using an Index

Indexes are created implicitly when an upsert operation is performed,
so there is no specific endpoint for creating an index.

For example, the code snippet below will create the index `foo` if it does not already exist,
upsert and search the document only on that index.

<Tabs>
  <Tab title="Python">
    ```python  theme={"system"}
    index = client.index("foo")
    index.upsert( ... )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts  theme={"system"}
    const index = client.index("movies");
    await index.upsert( ... );
    ```
  </Tab>
</Tabs>

***

## Listing Indexes

Names of all the active indexes of a database can be listed as follows:

<Tabs>
  <Tab title="Python">
    ```python  theme={"system"}
    client.list_indexes()
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts  theme={"system"}
    await client.listIndexes()
    ```
  </Tab>
</Tabs>

***

## Deleting an Index

Leftover indexes can be deleted as follows:

<Tabs>
  <Tab title="Python">
    ```python  theme={"system"}
    client.delete_index("foo")
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts  theme={"system"}
    await client.index("foo").deleteIndex();
    ```
  </Tab>
</Tabs>