I've built a few different types of search engines over the years.
The first attempt was in 1999, i built a meta search engine using coldfusion.. I didn't have any server to run it on so it was on my dialup running locally. Worked pretty well, i was a big fan of metacrawler at the time.
The next time was back in around 2003.. I had a server running on my adsl connection at the time. I wrote a crawler of sorts that indexed word positions to search by proximity. At the time, Google didn't do this, it was a feature i was looking for. Eventually, the project died. If i had a 200k startup fund like google had, it could have probably turned into something.
I did build it on mysql and perl but it needed more servers.. Something i didn't really understand back then with only about 4 years web experience.
Then, i built another a meta search engine, ran it on a hosted server, gained some limited traction around 2011. Died as the sources for the api dried up or became too costly. It did make some money from advertising at the time, which is a pretty big deal. The coolest thing was the fact that i kept the searches open, each search had an rss feed that you could use to keep track of certain keyword sets.
Something i need to say about Google is this: it seems simple, but there is a lot going on in the background. Its doing a lot of things like checking for malware, spam, link farms, etc. but also its running the page in a real browser. Its pulling in data from google analytics and clickthrough/bounce rates, its always split-testing result sets, showing results based upon geographic location, language recognition, date recognition, etc. They use machine learning with real humans training those models, that's not to mention their internal systems for managing servers.
I think you shouldn't try and copy what they are doing, in the end it doesn't matter if you do.. Look at bing, its kind of like a joke compared to Google.
Facebook did the right thing, that was to bring the community and data onto the site itself. Identity is the future. Reddit is pretty good as well, you can talk about any link on the internet.
User-moderated content is the future, as AI/ML can always fool another AI/ML but not a human.
You only have to look at this site hacker news to tell that.