You can self-host Marginalia [1] or Hister [2], for example. Takes up some space, but it's totally doable. Your biggest problem (assuming you have disk space) will be crawling.
At least if we're speaking a more generalist web search it requires dedicated hardware, that's pretty costly. Marginalia's production server cost about $20k back when RAM and SSDs were cheap. It used to run on $5k of PC hardware before, but that was very limiting.
So no data center, but at the same time, not everyone has that sort of cash to throw around.
[1] : https://github.com/MarginaliaSearch/MarginaliaSearch
[2] : https://github.com/asciimoo/hister