DiscoveryNext: Local Semantic Search for Legal Writing

I have roughly a thousand legal documents scattered across my machine—motions, pleadings, deposition transcripts, court orders buried in folders and old case files, some as PDFs, others as Word docs, a few as scanned images from 2012 that someone emailed me once and I never organized. What I need is to find things like “that motion where we asked for exclusive possession of the house” without remembering the exact words I used, because maybe I wrote “marital residence” instead, or “remove the other party,” or cited a statute without ever using the word “exclusive” at all.

I need concept search, and I need it to happen entirely on my computer because attorney-client privilege isn’t negotiable.

That’s DiscoveryNext.

What It Does

DiscoveryNext indexes your legal documents and lets you search them by concept rather than keyword. You type a query in plain English and it returns the relevant passages with citations in under a second, all running on your Mac with nothing leaving your machine—no accounts, no cloud sync, no telemetry.

How It Works

DiscoveryNext reads through your documents and extracts the text, running optical character recognition on scanned PDFs to pull out words that would otherwise be invisible. It breaks the documents into sensible pieces that respect the natural structure of legal writing, so an argument stays together instead of being sliced mid-thought the way fixed-size chunking would handle it. Each piece gets converted into a mathematical representation that captures meaning rather than just words, which is why “exclusive possession” and “sole occupancy” end up with similar representations despite sharing no keywords. These representations get stored in a local database, and when you search, DiscoveryNext finds the passages that match your query’s meaning before running a second pass to filter out false positives—the kind that look similar but miss what you’re actually asking for.

Why This Matters

Most AI tools for lawyers expect you to upload documents to the cloud where the vendor’s servers process them and return search results, which works fine until you’re handling sensitive matters and need to explain to clients that their filings are being processed by a third-party AI service. DiscoveryNext runs locally and continues working even when your Mac isn’t connected to the internet.

Lawyers don’t always use consistent language across cases, so a motion for “exclusive possession” in one matter might be titled “petition for sole occupancy” in another while addressing the identical legal concept. Keyword search misses that connection entirely, but DiscoveryNext catches it because it’s looking at meaning rather than matching strings of text.

Legal sections run long—an argument might span 3,000 words—and most AI tools have short context windows that would truncate mid-argument and lose the thread. DiscoveryNext uses models designed for long documents so a full legal section fits without chopping, letting the re-ranker read the whole thing and understand the context before scoring it.

The first index of 1,000 documents takes a few hours, which is fine because you run it once overnight, but nobody wants to wait hours every time they add a new motion. DiscoveryNext tracks which files have changed and skips unchanged files during re-indexing, so adding 10 new documents takes minutes instead of hours.

What It’s Not

DiscoveryNext doesn’t generate answers or summarize documents the way a chatbot would—it retrieves passages and shows you where they came from, because for legal work, citation matters more than synthesis. Your documents stay on your machine without cloud sync, and this is a solo practitioner tool without multi-user features or authentication layers.

Why I’m Building This

I’m an attorney who has written motions on issues I’ll face again and researched statutes I’ll need to cite next year, and when I need them I can’t find them because keyword search fails me. I want a tool that remembers what I’ve written and where I’ve written it, that understands legal concepts instead of just strings of text, that respects the confidentiality of my work without requiring me to trust a vendor’s privacy policy.

That’s DiscoveryNext. This has been a huge undertaking for a self-taught programmer and I’ve learned more than I ever expected about software engineering. It’s not perfect yet, but it’s getting there. The underlying engine works, but until I build the interface it is more of a proof of concept than a product. Stay tuned!


If you’re working on similar tools or have thoughts on local-first AI for professional work, I’d love to hear from you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.