namespaces.create
Creates a new namespace for storing data.Parameters
A unique name for the namespace.
The type of namespace: “text” or “vector”.
The dimension of vectors. Required only if type is “vector”.
Dict[str, Any] - A dictionary confirming the creation details.
Raises: ConflictError, InvalidInputError.
Create Namespace Examples
namespaces.list
Retrieves a list of all namespaces accessible by your API key. Returns:Dict[str, Any] - A dictionary containing a list of namespace objects under the namespaces key.
List Namespaces Example
namespaces.delete
Permanently deletes a namespace and all its contents. This action is irreversible.Parameters
The exact name of the namespace to delete.
None.
Raises: NamespaceNotFound.
Delete Namespace Example
Complete Example
Complete Namespace Management Example
Namespace Types
| Feature | Text Namespaces | Vector Namespaces |
|---|---|---|
| Primary Use | Storing and searching text documents | Storing pre-computed vector embeddings |
| Embeddings | Automatically generated by Moorcheh | Provided by you (custom embeddings) |
| Requirements | None | Must specify vector dimension |
| Search Capabilities | Full-text search | Vector similarity search |
| Ideal For | FAQs, documentation, articles | Image embeddings, custom ML models |
Best Practices
- Use descriptive namespace names that indicate their purpose
- Separate different types of content into different namespaces
- Consider your data organization strategy before creating namespaces
- Text namespaces are easier to work with for most use cases
- Only use vector namespaces if you need to provide your own embeddings