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.
Ingest
Index
Query
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.