This past weekend, sitting in a restaurant with my wife and in-laws, I recognized an old friend from high school. We hadn't seen or spoken to one other in more than a decade.

Turns out, she works in the restaurant, and was just finishing up her shift for the day. I had no idea that she worked there, or even that we live in the same city. A completely chance encounter.

But thanks to Graph Search, a new Facebook feature that rolls out widely starting this week, these sorts of chance encounters could become a little less random.

If I want to bump into high school classmates who work at nearby restaurants, I can search Facebook for just that.

"Restaurants in my city that people I went to high school with work at" is a completely valid search query, and it works because Facebook already contains all the information required to play what feels like Six Degrees of Kevin Bacon on steroids.

Facebook knows which high school I graduated from (and when) and where I live now, and it has access to a large database of local businesses (including restaurants) and their self-identified employees.

This type of "social search" is based on the premise that by taking into account who you know, a service can deliver more personalized and relevant results.

Weird and wonderful opportunities

Playing around with Graph Search reveals a number of weird and wonderful opportunities for people-watching, all powered by structured data, semantic search and Facebook’s mountain of information. Building on my previous query, "Photos taken in restaurants that people I went to high school with visited" yields many photos of strangers at McDonald’s, for instance.

But I found a number of practical uses, too.

hi-graph-search-852-6col

Facebook Graph Search allows users to do more personalized and relevant searches on the social media site. (Facebook )

For instance, I'm planning a baseball road trip to Detroit later this summer. Searching "Restaurants in Detroit, Michigan liked by my friends" turns up a few places worth looking into. But you can also cross-reference searches in lots of interesting ways.

Let's say I want to go to a restaurant where I'll also run into some baseball fans. "Restaurants in Detroit, Michigan liked by people who also like Detroit Tigers" results in some promising contenders.

If, for whatever reason, I want to maximize my chances of running into someone from high school at the restaurant before the game, I might try "Restaurants in Detroit, Michigan liked by people who like Detroit Tigers and who I went to high school with."

Suddenly, this feels far less like traditional keyword searching, and more like a brand new way of filtering, sorting and cross-referencing information. It allows users to discover connections that aren't always obvious.

But that's not necessarily a good thing.

Unexpected uses, unintended consequences

Back in January, when Graph Search was first introduced, Tom Scott started a Tumblr called Actual Facebook Graph Searches. In it, he listed potentially embarrassing searches, such as "Mothers of Jews who like Bacon" and "Married people who like Prostitutes," which returned several results.

He also got results for "Islamic men interested in men who live in Tehran, Iran" and "Family members of people who live in China and like Falun Gong."

It strikes me that many of us think of our online privacy settings in a granular way, controlling who sees what information on a piece-by-piece basis. I suspect it's going to take a while before we wrap our heads around what's possible when these bits of information are increasingly aggregated, filtered and cross-referenced.

More broadly, I worry that social search technologies could narrow my worldview.

Social scientists who study online tools often talk about "homophily," which is another way of saying, "Birds of a feather flock together." We tend to hang out with people who are similar to us. We tend to like the same things our friends like. We like familiarity, and the internet is really good at serving up familiarity in order to prolong our time on any given site.

As with recommendation services, which I've written about before, I worry that the tools I use may only show me the small sliver of the world that me and my friends know and care about.

Do I want the time I spend online to reinforce my existing beliefs and ideas? Or do I want to be pushed, and challenged, and have my worldview expanded?

The researcher Ethan Zuckerman frames this inherent tension in personalized search and recommendation engines as "comfort versus challenge."

My hope is that the comfort that services like Graph Search provides doesn't spoil my appetite for challenge.