This is a web search-engine that can easily hold a few hundred million web-pages in its search-index. If you want to see what it can do see https://www.acoon.de/en/
The above website runs on an Intel i7-3770K with 32gb RAM and two 500gb SSDs. The search-index on that site currently holds about 327 million WWW-pages. On average a query takes about 0.6 seconds. The transfer-speed from SSD into RAM is the limiting-factor for query-time. Even 600mb/s can be slow sometimes. :)
The software is written in Delphi (=Pascal). The code is written for Delphi XE2. I don't know if it will compile and run in newer versions of Delphi.
Most - but not all - of the code will compile with FreePascal too.
Sorry for the quality of the code. Some of it was written 15 years ago when I was still young and stupid. :)