Facebook takes swing at Google with new search feature

Facebook has bolstered its search function by indexing 2 trillion posts in a move designed to attack Google's core business and challenge Twitter's news product.

The move will allow users to search for topics and be given a bunch of public posts dating back to Facebook's inception.

"With over 1.5 billion searches per day and over 2 trillion posts in our index, search is an important, long-term effort at Facebook," Tom Stocky, the social networking giant's vice president of search, said in a blog post on Thursday.

"When something happens in the world, people often turn to Facebook to see how their friends and family are reacting. Today, we're updating Facebook Search so that in addition to friends and family, you can find out what the world is saying about topics that matter to you."

By encouraging users to search on the social network rather than through a search engine, Facebook move pitches it into a turf war with Google. It is also challenging Twitter's recently launched "Moments" feature -- a feed that allows users to see the biggest stories of the day through tweets, pictures and videos.

Search results will be personalized, according to Facebook, which added that you will be able to find public conversations around a widely shared link, for example, as well as check out an "aggregate overview of sentiment".

While Facebook is not introducing any new ad features yet, the new search function could open the door for new possibilities. Facebook will be hoping to take away some search advertising share from Google, which currently dominates, capturing over half of all search ad revenue, according to eMarketer.

Facebook's search function will be able to surface old content so even posts you may have done years ago could be found. This of course raises questions about privacy. People who don't want any future posts to appear on search can make them private.

For the search function to grow on Facebook, the social network will have to rely on users continuously posting public content.

Analysts also warn that Facebook will need to wean people off Google for search.

"We have been so used to using Google, the question is to what extent could Facebook add to that or substitute for that, and it is still unclear," Ian Maude, online media analyst at Enders Analysis, told CNBC by phone.

"In the short to medium term there is no significant threat to Google."