Skip to content

Memista

Crates.io Documentation License

Memista is a high-performance vector search library that combines SQLite for metadata storage with USearch for efficient vector similarity search. It provides both a library interface for embedding in Rust applications and a standalone HTTP server.

Features

  • Fast Vector Similarity Search - Utilizes USearch for high-performance similarity search
  • Persistent Storage - Stores text chunks and metadata in SQLite for durability
  • Multi-Database Support - Supports multiple isolated databases through database_id partitioning
  • Comprehensive API Documentation - Auto-generated OpenAPI documentation with Swagger, Redoc, and RapiDoc interfaces
  • Environment-Based Configuration - Easily configurable through environment variables
  • Asynchronous I/O - Built with async I/O for high performance and concurrency
  • Memory Efficient - Uses optimized data structures for efficient memory usage

Quick Start

Install as a Library

Add this to your Cargo.toml:

[dependencies]
memista = "0.1"

Install as a CLI Application

cargo install memista
memista

The server will start on http://127.0.0.1:8083 by default.

Basic Usage

Insert a text chunk with its embedding:

curl -X POST http://localhost:8083/v1/insert \
  -H "Content-Type: application/json" \
  -d '{
    "database_id": "my_db",
    "chunks": [{
      "embedding": [0.1, 0.2],
      "text": "Sample text",
      "metadata": "{\"source\": \"document1\"}"
    }]
  }'

Search for similar chunks:

curl -X POST http://localhost:8083/v1/search \
  -H "Content-Type: application/json" \
  -d '{
    "database_id": "my_db",
    "embeddings": [[0.1, 0.2]],
    "num_results": 5
  }'

Next Steps