THEIR CHALLENGE
Losing Time and Money to a Fragmented Search Architecture
Squary AI is an AI-powered legal platform that learns how a firm produces legal work and applies that expertise consistently across the organization. It generates summaries, chronologies, deposition prep, and hearing memos from large, complex document sets, with every output source-linked to page-level citations attorneys can verify.
For years, Squary AI ran its core database on MongoDB Atlas but handled text and vector search through a separate, complex deployment of OpenSearch Service (Elasticsearch) on AWS. That split created mounting problems. “For OpenSearch, we were experiencing up to 15 seconds of query lag, and that’s on top of OpenSearch being more expensive. So, the price-to-performance ratio was not that great,” said Justin Waltrip, Co-founder of Squary AI.
The instability went beyond slow queries. OpenSearch failed to scale reliably under high usage, causing production outages. Because attorneys depend on Squary AI for active casework, any downtime meant lost access. With billing rates of $200 to $400 per hour and 20 to 25 hours of review work per case, a single day of downtime across multiple client firms represented tens of thousands of dollars in delayed billable work and missed deadlines. When known bugs surfaced, the only recourse was to wait for support, which could take up to 24 hours to respond. In legal workflows, that delay is a liability.
Running a separate search database also added architectural complexity. Visibility into metrics was limited, and the team received no advance warning when the system needed to scale. Inspecting raw data was its own hurdle; engineers had to route through an extra layer of secured infrastructure to reach the data behind it. “Structurally and architecturally, it was significantly more complicated than having everything in MongoDB,” Waltrip said.
OUR SOLUTION
Using MongoDB Search and Vector Search on Atlas for Squary AI
Squary AI migrated its entire search component to MongoDB Atlas, consolidating its core database, text search, and vector search into a single unified platform. With every hour of downtime translating into delayed billable work for client firms, a fast, low-disruption migration was essential. “The migration was surprisingly fast; we adapted our code in a matter of days,” Waltrip said.
The migration itself required no restructuring or rewriting of schemas. The flexible schema design of MongoDB let the team index existing collections directly, and a dual-write period enabled Squary AI to validate results before fully migrating. The entire effort required minimal code changes relative to the architectural lift it delivered, collapsing two systems and two vendor relationships into one.
Using MongoDB Search and MongoDB Vector Search on Atlas, Squary AI built a hybrid retrieval approach that combines embeddings with full-text similarity to deliver highly relevant search results. That architecture powers retrieval-augmented generation with large language models, including Claude or Amazon Bedrock, depending on the sensitivity of a given client’s data.
A crucial part of that architecture is citation. With MongoDB Vector Search on Atlas, Squary AI can attach a citation to every claim in a generated report, helping to avoid hallucinations and letting legal professionals verify information sourced from documents that can run to tens of thousands of pages. For a platform where accuracy is the top priority, that trust layer is foundational to the product.

