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

# Legacy Client Methods

> Deprecated legacy Python SDK API. Moorcheh no longer supports these methods-use the resource-based client instead.

<Warning>
  **Deprecated and unsupported.** The legacy client methods on this page are **not supported**. They may be removed or break without notice. **Do not use them in new code.** Migrate to the resource-based client (`MoorchehClient` with `client.namespaces`, `client.documents`, `client.answer`, etc.) as shown in the [Python SDK introduction](/python-sdk/introduction) and the migration table below.
</Warning>

## Migration Guide

| Deprecated Method       | New Method                       |
| :---------------------- | :------------------------------- |
| `create_namespace`      | `client.namespaces.create`       |
| `delete_namespace`      | `client.namespaces.delete`       |
| `list_namespaces`       | `client.namespaces.list`         |
| `upload_documents`      | `client.documents.upload`        |
| `get_documents`         | `client.documents.get`           |
| `delete_documents`      | `client.documents.delete`        |
| `upload_vectors`        | `client.vectors.upload`          |
| `delete_vectors`        | `client.vectors.delete`          |
| `search`                | `client.similarity_search.query` |
| `get_generative_answer` | `client.answer.generate`         |

## Namespaces

### create\_namespace

<Warning>Deprecated. Use `client.namespaces.create` instead.</Warning>

Creates a new namespace.

```python theme={null}
client.create_namespace(namespace_name="my-ns", type="text")
```

### delete\_namespace

<Warning>Deprecated. Use `client.namespaces.delete` instead.</Warning>

Deletes a namespace and all its data.

```python theme={null}
client.delete_namespace("my-ns")
```

### list\_namespaces

<Warning>Deprecated. Use `client.namespaces.list` instead.</Warning>

Lists all available namespaces.

```python theme={null}
client.list_namespaces()
```

## Documents

### upload\_documents

<Warning>Deprecated. Use `client.documents.upload` instead.</Warning>

Uploads text documents to a text-based namespace.

```python theme={null}
client.upload_documents("my-ns", [{"id": "1", "text": "hello"}])
```

### get\_documents

<Warning>Deprecated. Use `client.documents.get` instead.</Warning>

Retrieves documents by their IDs.

```python theme={null}
client.get_documents("my-ns", ["1"])
```

### delete\_documents

<Warning>Deprecated. Use `client.documents.delete` instead.</Warning>

Deletes documents by their IDs.

```python theme={null}
client.delete_documents("my-ns", ["1"])
```

## Vectors

### upload\_vectors

<Warning>Deprecated. Use `client.vectors.upload` instead.</Warning>

Uploads pre-computed vectors to a vector-based namespace.

```python theme={null}
client.upload_vectors("my-ns", [{"id": "1", "vector": [0.1, 0.2]}])
```

### delete\_vectors

<Warning>Deprecated. Use `client.vectors.delete` instead.</Warning>

Deletes vectors by their IDs.

```python theme={null}
client.delete_vectors("my-ns", ["1"])
```

## Search & Answer

### search

<Warning>Deprecated. Use `client.similarity_search.query` instead.</Warning>

Performs a semantic search.

```python theme={null}
client.search(namespaces=["my-ns"], query="hello")
```

### get\_generative\_answer

<Warning>Deprecated. Use `client.answer.generate` instead.</Warning>

Generates an AI answer based on a search query.

```python theme={null}
client.get_generative_answer("my-ns", "What is...?")
```
