Skip to content

Saša Sladić

AI product engineer. 10+ years of full-stack engineering and software architecture.

All work

Self-hosted document search for Karanović & Partners

1M+ scanned legal documents turned into structured data you can search by meaning

OCR ingestion, automatic classification and entity extraction, then concept search in under a second. Self-hosted, so privileged documents never leave the firm.

Client
Karanović & Partners
My role
Full-stack developer
Year and duration
2025, 8-10 weeks
Stack
Laravel, Vue.js, Elasticsearch, Kibana, OCR, AWS
Search results screen of the legal document search platform

The problem

The firm was quoted up to $255K over three years for a document management product that would still put privileged documents on someone else's cloud. Their own search took about 8 seconds a query and could not tell that "breach of contract" and "material default" mean the same thing. Associates spent two to three hours per research task re-finding work the firm had already done.

What we built

A self-hosted knowledge platform on the firm’s own AWS account, with Elasticsearch doing the heavy lifting.

The search layer combines synonym recognition, fuzzy matching, n-gram analyzers and query boosting. The legal synonym list is maintained by hand, because a generic model does not know that a specific phrase carries a specific meaning in that firm’s practice area. That list is the difference between a demo that impresses and a tool associates still use in month four.

Ingestion runs OCR over scanned documents, then classification, clause detection and entity extraction. Kibana sits behind it for search analytics, so the knowledge management lead can see which queries return nothing and fix the gap instead of guessing.

Results

Queries return in well under a second across more than a million documents. Type a plain-language description of what you need and the platform surfaces documents that never contain those words.

Nothing leaves the firm’s infrastructure. There is no vendor with a copy of the corpus, which removes the exposure that comes with putting privileged material on a third-party platform.

Concept matching runs on a curated legal synonym list layered over Elasticsearch analyzers. A search for "breach of contract" also returns "material default" and "failure to perform".
Concept matching runs on a curated legal synonym list layered over Elasticsearch analyzers. A search for "breach of contract" also returns "material default" and "failure to perform".
Scanned PDFs go through OCR, then clause detection and entity extraction pull out parties, dates, amounts and jurisdiction, metadata nobody had to type.
Scanned PDFs go through OCR, then clause detection and entity extraction pull out parties, dates, amounts and jurisdiction, metadata nobody had to type.
Matter-level access control: associates only see the matters they are assigned to and the index runs on the firm's own AWS account.
Matter-level access control: associates only see the matters they are assigned to and the index runs on the firm's own AWS account.