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.
Prerequisites
pip install moorcheh-edge
moorcheh-edge up
Full example
import random
from moorcheh_edge import MoorchehEdge, MoorchehEdgeApiError
def rand_vec(dim: int = 1024) -> list[float]:
return [random.random() for _ in range(dim)]
with MoorchehEdge(port=8080, skip_pull=False) as client:
health = client.health()
print(f"Items: {health['items']} / {health['max_items']}")
client.upload([
{"id": "item-1", "vector": rand_vec()},
{"id": "item-2", "vector": rand_vec()},
])
results = client.search(query=rand_vec(), top_k=3)
for r in results:
print(r["id"], r["score"], r["label"])
client.delete(["item-1"])
Attach to an existing server
from moorcheh_edge import MoorchehEdgeApiClient
client = MoorchehEdgeApiClient("http://localhost:8083")
print(client.health())
CLI equivalent
moorcheh-edge status
moorcheh-edge upload-vectors --vectors-file payload.json
moorcheh-edge search --query-vector-json "[...]" --top-k 5
moorcheh-edge delete --ids-json '["item-1"]'
Tips
- Vectors must be exactly 1024 floats
- Plain text search is not supported
- Store cap is 10,000 items — handle
MoorchehEdgeApiError with status 409
Next steps