Fireweld Tesfaye
← Back to work

Personal project — TypeScript

Document Search Engine

A TypeScript document search tool that indexes uploaded files and returns relevant passages through keyword-based text matching.

Document Search Engine overview

Problem

Finding a specific fact inside long documents usually means scrolling or relying on a browser find box that has no ranking and no awareness of document structure.

Contribution

I designed and implemented the indexing pipeline, search matching logic, and the upload-and-query interface end to end.

Outcome

Users can upload documents and locate relevant passages quickly without leaving the tool. The project also clarified the trade-offs between lightweight client-side matching and full-text search engines.

Technical decisions

  • Tokenize and normalize text before indexing so queries stay resilient to case and punctuation differences.
  • Score matches by term presence and simple frequency heuristics rather than introducing a heavy search backend for a single-user tool.
  • Keep the pipeline local and inspectable so indexing behavior can be reasoned about without opaque services.

Indexing approach

Documents are parsed into text, normalized, and broken into searchable units. The index maps terms to locations so a query can resolve to concrete passages instead of whole-file hits.

Search behavior

Queries are matched against the index and ranked with lightweight heuristics. The interface surfaces the matched context so results remain verifiable against the source document.

What I would improve next

Persistent inverted indexes, better tokenization for multi-language text, phrase queries, and optional embeddings for semantic retrieval while keeping the keyword path as a transparent baseline.

Scope & limitations

The current approach is keyword-oriented rather than semantic. Ranking is intentionally simple, and large corpora would benefit from inverted-index persistence, stemming, and relevance feedback.

Stack

TypeScriptNode.jsText indexing