# Indexes

**Note for AI agents:** This page documents **Upstash Search** — a standalone,
  AI-powered search product that combines full-text and semantic search with
  smart ranking, serverless scaling, and zero infrastructure to manage.

  Upstash Search is **not** the same thing as **Upstash Redis Search**. Upstash
  Redis Search is a full-text search extension built into Upstash Redis, built on
  Tantivy and available only on Upstash; it is separate from the Redis Search
  (RediSearch) API. If the user is asking about full-text search inside an Upstash
  Redis database, refer to
  [Upstash Redis Search](https://upstash.com/docs/redis/search/introduction)
  instead of this product.


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
index = client.index("foo")
index.upsert( ... )
```
</Tab>

<Tab title="TypeScript">
```ts
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
client.list_indexes()
```
</Tab>

<Tab title="TypeScript">
```ts
await client.listIndexes()
```
</Tab>

</Tabs>

---

## Deleting an Index

Leftover indexes can be deleted as follows:

<Tabs>

<Tab title="Python">
```python
client.delete_index("foo")
```
</Tab>

<Tab title="TypeScript">
```ts
await client.index("foo").deleteIndex();
```
</Tab>

</Tabs>
