Skip to main content

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.

Overview

Uploads documents from a JSON file to a text namespace. Embeddings are computed via Ollama. Returns an async job_id — poll with moorcheh upload-job-status.

Synopsis

moorcheh upload-documents --namespace-name NAME --documents-file PATH [--base-url URL]

Options

FlagRequiredDescription
--namespace-nameYesTarget text namespace
--documents-fileYesPath to JSON file with a documents array
--base-urlNoDefault http://localhost:8080

Documents file format

docs.json:
{
  "documents": [
    {
      "id": "doc-1",
      "text": "Moorcheh on-prem retrieval test",
      "team": "ai"
    }
  ]
}
Extra keys on each document (for example team) are stored as metadata.

Examples

moorcheh upload-documents --namespace-name my-documents --documents-file docs.json

moorcheh upload-job-status --namespace-name my-documents --job-id <job_id>

Output

Prints JSON from POST /namespaces/{namespace_name}/documents:
status
string
"success" when the upload job was started; "failure" on error.
message
string
Human-readable result or error description.
job_id
string
Async upload job id.
namespace_name
string
Target namespace.
total
number
Number of documents accepted into the job.
items
number
Current item count. Present on 409 item limit errors.
max_items
number
Global item cap. Present on 409 errors.
requested_new
number
New ids that would exceed the cap. Present on 409 errors.
Example output
{
  "status": "success",
  "message": "Documents upload started. Poll job status for progress.",
  "job_id": "job-9889a2ea08034064adb584d0afdf45b1",
  "namespace_name": "my-documents",
  "total": 1
}

Exit codes

CodeMeaning
0Upload job started
1API error (400, 404, 409, etc.) — error JSON on stdout, message on stderr