Hard part is doing it at any sort of scale and producing useful results. It's easy to build something that indexes a few million documents. Pushing into billions is a bigger challenge, as you start needing a lot of increasingly intricate bespoke solutions.
Devlog here:
https://www.marginalia.nu/tags/search-engine/
And search engine itself:
https://marginalia-search.com/
(... though it operates a bit sub-optimally now as I'm using a ton of CPU cores to migrate the index to use postings lists compression, will take about 4-5 days I think).
AMD EPYC 7543 x2 for 64 cores/128 threads
512 GB RAM
~ 90 TB of PM9A3 SSDs across 12 physical devices
Storage is not very full though. I'm probably using about a third of it at this point.
I found it didn’t really work as a real search engine but it was interesting.