StackeyLabs

Case Study · Knowledge Management

Enterprise Document Search Engine

A full-text search system over a large document archive, built to return relevant results in under a second at scale.

Industry
Knowledge Management
Timeline
2025
What we did
Search infrastructure · Performance engineering · Technical SEO

The Challenge

What the client was up against

The client held a large and growing archive of documents that was, in practice, unsearchable. Finding anything meant already knowing where it lived. Naive database queries took many seconds and got worse with every document added, and none of the content was discoverable from a search engine.

Our Approach

How we solved it

  1. Separate the store from the index

    Documents and their files live in object storage and a document database; the search index is a separate, purpose-built layer. That split means the index can be tuned, re-analysed, or rebuilt from scratch without ever putting the source data at risk.

  2. Tune for relevance, not just matching

    We invested in the analysis pipeline — tokenisation, stemming, field weighting — so that the first result is usually the right one. Highlighted snippets show users why a document matched, which is what makes a result trustworthy rather than merely present.

  3. Make the archive findable from outside

    Result and document pages are server-rendered with proper metadata and structured data, so the archive is indexable by search engines. The content stopped being a private silo and started bringing in organic traffic.

What We Built

Inside the solution

  • Full-text search with typo tolerance and stemming
  • Faceted filtering across document metadata
  • Highlighted result snippets showing match context
  • Cloud object storage for source files with a separate search index
  • Server-rendered, crawlable result and document pages
  • Incremental indexing as new documents arrive

Technology

  • Next.js
  • Elasticsearch
  • MongoDB
  • Cloud object storage
  • Node.js

The Outcome

Sub-second full-text search across the entire document archive.

<1s
Typical query response time
Scales
Index grows without degrading query latency
Indexable
Archive discoverable through organic search

Search is an infrastructure decision, not a feature checkbox. Bolting a wildcard query onto your primary database is a deadline you have borrowed against.

Facing a Similar Problem?

Tell us what you're working on and we'll tell you how we'd approach it — no obligation.

Contact Us