Private semantic file search app for Windows
A Windows desktop app that finds files by what they mean, across documents and photos, with everything staying on the user's machine.
The problem
A client wanted to find files on their own computer by describing them in plain words, the way you would ask a person, and did not want private documents and photos sent to a cloud service to make that work. Filename search could not do it, and the search had to stay quick on older laptops.
How I built it
I built a PyQt6 desktop app around a local SQLite index. Text from PDF, Word, PowerPoint and Excel files is embedded with a small BGE model and photos are embedded with CLIP, so a search like 'family reunion 2024' can match a picture whose filename is just IMG_4382.jpg. Each query is scored against both spaces, with a boost for files whose name or path contains every query word. A file watcher keeps the index current while the app is open, a catch-up scan on launch picks up whatever changed while it was closed, and the first run shows a one-time indexing banner, a live file counter and a progress bar.
What got hard
- The packaged Windows build could not load PyTorch. Windows threw a DLL load error (WinError 1114) because the Qt and OpenMP runtimes were being loaded in the wrong order.
After several rebuilds I exported both models to ONNX and removed PyTorch from the build, so the app needs only the ONNX runtime, a tokenizer library and NumPy. A small runtime hook also loads the ONNX runtime before Qt starts, which fixes the load order.
- Searching by meaning buried exact filename searches. A short query that matched a file's name exactly could rank below loosely related files.
I added a keyword boost on top of the vector scores. When every query word appears in a file's name or path it moves up, with a bigger boost when the match is in the filename itself.
- Search quality varied. Files added after the first scan were embedded with weaker logic than files from the first scan, which showed up in testing as 'sometimes it finds it, sometimes it does not'.
The file watcher and the launch-time catch-up scan now call the same indexing function as the initial scan, so a file gets the same embedding however it arrives.
- Keeping search instant and indexing safe on a large drive. Re-reading every stored vector for each query is far too slow, and one huge or stuck file can block a whole indexing run.
The index keeps normalised matrices in memory, rebuilt lazily when files change, so a query is one matrix product per space plus a partial sort. Indexing skips system folders, caps file size at 200 MB, gives each file a 45 second timeout, stops if free disk space drops under 500 MB, and loads the models before the workers start. Speech transcription of audio and video is opt-in and off by default, because a long video can occupy a worker for tens of minutes.
The result
I delivered the Windows build (v1.1, a 669 MB zip with the app and both models inside) in May 2026. Indexing and search run on the user's machine, and I found no network calls in the application code.
The ← and → keys turn the page too.