At some point at work I had to delete a large Elasticsearch index. Straightforward task, you’d think. The index had grown out of control, nothing useful in it anymore, and it was eating disk.

The problem was how you delete in Elasticsearch. delete_by_query doesn’t just delete — it copies the data to a new index first, then removes the old one. So before you can delete your way out of a disk space problem, you need… disk space. Enough to hold a second copy of the index you’re trying to get rid of.

I stared at that for a while.

That was the final drop. It wasn’t even the worst thing Elasticsearch had done to me over the years — the JVM memory overhead, the cluster split-brains, the startup times, the operatational complexity for something that’s fundamentally just an index. But the delete thing broke something in my brain and I went home and started writing Rust.


Some background on the JVM hate

I’ll be honest: my dislike of the JVM isn’t always rational. There are teams running Elasticsearch in production with zero problems, and they’d probably tell me I’m complaining about sharp corners when I should just learn to handle tools properly. Fair.

But I’ve spent too many hours tuning heap sizes and watching GC pauses eat into search latency to feel warmly about it. And for a search engine specifically — something you want to be fast, predictable, and cheap to run — “requires a tuned JVM” feels like the wrong starting point.


What I built instead

Prism is a Rust-based hybrid search engine. It combines vector search (HNSW) with full-text search via Tantivy, with configurable fusion strategies (RRF or weighted) for when you want both at once. Single binary, no JVM, no cluster coordination required for single-node deployments.

It was also, I think, one of my first serious Rust projects. Which means there’s a certain amount of history embedded in the codebase — early decisions I’d make differently now, patterns I had to rewrite as I understood the language better. I’ve since used Prism pretty heavily to clean up a lot of that; catching bugs, improving the worst of the design decisions, and generally making it something I’d actually recommend someone else use.

The Elasticsearch compatibility layer came early — prism-es-compat speaks enough of the ES query DSL that you can point existing tooling at it without rewriting everything. Not 100% coverage, but enough for the common operations.


The AI angle

More recently Prism became the long-term memory layer for an agent system I’ve been building. Long-lived AI agents use Prism to store and retrieve memories across sessions. When an agent asks itself “what do I know about X?”, it searches Prism with a semantic query and gets back ranked fragments from everything it’s ever learned — not just keyword matches, but semantically similar experiences.

That’s actually what pushed me to add the vector and graph support on top of the original text search. Pure keyword search isn’t good enough for memory retrieval when you want “find what I know about deploy failures” to match “the Kubernetes pod kept crashing because of memory limits” without requiring exact terms.

There’s also a code intelligence layer built on tree-sitter. Prism can parse ASTs for the languages it’s configured for, which means when an agent is reviewing code it doesn’t just have text search — it has symbol-level understanding. Where is this function called? What calls into this module? That kind of query gets answered structurally, not by hoping the variable name shows up in a nearby chunk.


Where it is now

Pre-releases are available, the server is running on my own hardware, and projects of mine has been using it in production for a while. There’s a built-in web UI at /ui, an embedding cache so you’re not hammering OpenAI for the same vectors repeatedly, and support for Ollama and ONNX for local inference if you don’t want to send your data anywhere.

The code is at https://github.com/mikalv/prism. There’s a docker-compose.yml if you want to spin it up quickly.

If you’ve also spent time staring at Elasticsearch’s disk situation and feeling a specific kind of anger — maybe give it a try.