Skip to content

feat: ephemeral in-memory named vector store #2

@kordless

Description

@kordless

Add a temporary session type that lives only in memory, never touches sled, and auto-expires 2 hours after the last ingest completes. Primary use case: crawl verification — ingest a batch, run queries against it from multiple angles, dump the full store, then it disappears.

Proposed API:

  • `POST /temp/:name/ingest` — same body as regular ingest, stored only in RAM
  • `GET /temp/:name/search?q=...` — same search params as regular session
  • `GET /temp/:name/dump` — return all chunks (text + embeddings)
  • `DELETE /temp/:name` — explicit teardown (auto-expire fires at 2h regardless)
  • `GET /temp` — list active temp stores (name, chunk count, expires_at)

Implementation notes:

  • `DashMap<String, TempStore>` in `AppState` with a TTL field set at completion of first ingest
  • Background task sweeps expired entries every 10 minutes
  • No sled writes — all vectors in process heap
  • Expiry clock starts when the last ingest request to that name completes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions