Work projectElektroservis

Engineering Document Search

Python developer · Apr–Oct 2026 · semantic + full-text search

Semantic and full-text search over an engineering-documentation archive of ~4.1k PDF, DOCX, XLSX and RTF files: a custom inverted index plus FAISS on sentence-transformers, behind a FastAPI service. No LLM generation.

Private code · NDA

Ingest

PDF · DOCX · XLSX · RTF
OCR · Tesseract · scans

Index

Inverted index · words · designations
sentence-transformers
FAISS

Query

FastAPI · hybrid ranking
HTML / JS · search UI
Engineering Document Search preview
The code is private (NDA), so this diagram shows the architecture I built.Open full size

Problem

Engineers searched a network archive of PDF, Word, Excel and RTF files and scans by hand. Designations such as cable marks and document codes must match exactly, while phrases need meaning-based search.

Solution

A custom inverted index for exact designations plus FAISS semantic search, OCR for scans and reliability labels on every result; FastAPI backend, plain HTML/JS interface, deployed as a systemd service.

Result

Accepted by the client in September 2026: 0.18 s p95, 739 tests and a 104-query control set.

Overview

Elektroservis keeps its engineering (PTO) documentation in a network archive of about 4.1k PDF, DOCX, XLSX and RTF files, about 1.5k of them with text. From April to October 2026, under civil-law contracts, I built a search service over it: an engineer types a cable mark, a document code, an equipment designation or a phrase and gets the document, the PDF page (or Excel sheet and rows, Word section), a text fragment and the network path. Documents never leave the company network.

Search is hybrid, with no LLM generation: a custom inverted index over words and designations, plus FAISS semantic search on sentence-transformers embeddings (all-MiniLM-L6-v2). Designations are matched by general rules: look-alike Latin and Cyrillic letters, spaces and hyphens do not break a match, while numbers and marks are never substituted. Scans are detected automatically and selected pages go through Tesseract + Poppler OCR. The backend is FastAPI, the interface is plain HTML/JS, and it runs as a systemd service on Ubuntu Server with an atomic index swap and rollback.

Code and mark queries went from 9–10 s to 1.2–1.7 s and phrase queries from 55–70 s to 2–4 s; after the move to the inverted index, p95 is 0.18 s on 55 control queries. Quality is held by 739 pytest tests and a 104-query control set with top-1/top-5 metrics. I built it with AI agents (Codex, Cursor, Claude Code): I gathered the requirements, wrote the agent briefs, reviewed the changes and checked them on the production index. The client accepted the work in September 2026. The code is private, so the diagram shows the architecture.

What it does

  • Finds a cable mark, document code, equipment designation or phrase and returns the document, page (or sheet and rows), fragment and network path
  • Hybrid search: a custom inverted index plus FAISS semantic search on sentence-transformers (all-MiniLM-L6-v2)
  • Detects scans automatically and OCRs selected pages with Tesseract + Poppler
  • Reliability labels — exact match, needs review, partial match — and one result per document

What's next

Hiring for a full-stack or Python role — or need something like this built? Let's talk.

I'm open to offers — on-site or hybrid in Moscow, or remote; full-time or contract. I reply within 48 hours — faster on Telegram.

Get in touch TelegramDownload CV

Alhassan Alfarran.

© 2026 · Designed and built by me with Next.js, Tailwind and Framer Motion.

My local time: · Moscow

Notes
How this site is built

Stack

Next.js (App Router) and React, styled with Tailwind CSS and animated with Framer Motion. The contact form sends email through Resend; the site is hosted on Vercel.

Three languages, one layout

English, Russian and Arabic each have their own address (/en, /ru, /ar) and share one set of components. The layout uses logical CSS properties (start/end instead of left/right), so Arabic mirrors right to left without separate styles. The server sends every page with its language and text direction already set, so nothing flips after loading, and the Arabic font is only downloaded when Arabic text is on screen.

Performance and accessibility

Sections below the first screen skip rendering until you scroll near them, and the quick menu loads on first use. Everything works from the keyboard, with a skip link and visible focus, and animations switch off when your system asks for reduced motion.

Source code on GitHub