This morning, Facebook gathered a handful of press at its Menlo Park campus to announce it’s finally rolling out a functional search tool — a tool that’s been more than one year in the making.

Called Graph Search, Facebook’s offering will play on its strengths, allowing you to find people, places, and information based on human connections.

For example, it’ll make it easy for you to find friends of friends who are single women. Or friends who work at Microsoft’s San Francisco office. Or Austin restaurants your friends liked, or photos of your friends in Paris, or friends of yours who like both Twilight and Nickelback (so you can unfriend them).

“We’re taking a trip back to our roots,” said CEO Mark Zuckerberg. “This is one of the coolest things we’ve done in a while.”

The new Graph Search is not available to the public, but Facebook has made a very limited bit available for testing: You can “try a search” to see friends who live in your city. For access to the beta test, you need to join a waiting list.

Zuckerberg said Graph Search is, along with news feed and Timeline, one of the social network’s three main pillars.

The graph we’re talking about includes a billion people, 240 billion photos, and 1 trillion connections — all indexed for public search that’s also privacy-aware. With the new feature, you can only search content that’s been shared with you, specifically.

And all of that privacy, Zuck said, is a huge engineering task. “About 10 percent of our computing is spent on privacy checks,” said Zuckerberg. “This is infrastructure we’ve been building up over years.”

He continued to emphasize that Facebook’s Graph Search is going to be quite different from Google or Bing web search. “In general, web search is designed to … return links that may have answers to the questions that you’re trying to ask. Graph Search is designed to return the answer, not links that might get you to the answer.”

In that moment, the young CEO put his company in direct competition with Google’s most widely used product. But Graph Search, he said, is a smarter machine — the kind of natural language, smart search engine others have been trying to build all along.

“We came up with something we think is a lot more natural,” he said.

Here’s how it works: You type a query into the familiar search box, and a drop-down menu appears, showing categories that Graph Search understands — people, places, pictures, the kind of stuff we already know Facebook is good at.

Then, you can use pretty natural language, such as, “Who are my friends in Portland?” or “Museums in Washington, DC, my friends have been to.” Results are ranked based on social signals (likes, comments, etc.) as well as general content.

Here are a couple of sneak-peek shots of the product in action:

Gallery: Gallery

Don’t expect to see full Graph Search publicly rolled out any time soon, though. People, photos, places, and interests are the four query categories Facebook is indexing first. The beta product will come slowly with plenty of notification — and plenty of opportunities for you to get rid of or hide content you don’t want your friends or other Facebook users to be able to search for.

“It’s gonna take years and years to index everything,” Zuckerberg said. “There’s more content we haven’t gotten to than content we have.” Search for mobile, more languages, text posts, and Open Graph content will be coming soon. And, of course, an API is also on the roadmap, but perhaps a bit further down the line.

Monetization in the form of ads is coming, but Zuck said the company is focusing first on getting the product out of its initial beta version.

“It was a big engineering challenge to index all of that data in the first place,” said a product lead during the Q&A portion of today’s press conference. “It’s an enormous amount of data. Just the engineering work of building out that software … it’s taken us more than a year to do that.”

The rollout will start with U.S., English-speaking users. To get on the waitlist now, check out early registration. On that page, you can also get some use cases and personalized demos with the “Try A Search” link.

In anticipation of the news, which was hinted at in an invitation a few days ago, investors are growing more optimistic about the company. Facebook stock has risen to its highest price in months and is trading at $31.43 as of this writing.

Let’s not forget to follow the money; all that engineering and infrastructure work wasn’t just to delight all you users. Search makes up the largest portion of U.S. digital advertising spending, a grand total of $17.58 billion in 2012, according to research firm eMarketer.

And right now, the lion’s share of that market belongs to King Google, which grabbed 74.5 percent of U.S. search revenues last year. That statistic has been growing over the past year, not declining in spite of Bing’s best efforts.

A reporter in today’s audience asked Zuckerberg, “Was there even a consideration of working with Google [on graph search]?” Everyone in the room, including Zuckerberg, erupted into uncomfortable laughter. It was akin to asking two starving people fighting over the same steak if the one would lend the other a knife.

Ads make up the vast majority of Facebook’s revenue, but a lackluster search feature has hindered some of the network’s ability to place ads not only based on general interest but also based on the timing and intent of the user.

So to continue to compete in the cutthroat war for online revenue, Facebook had to release a search product — and it has to eventually prove it’s better than Google web search if the still-young social network wants to win the war.