Querying for relationships between objects
A graph is a way of representing connections between entities. In the picture here, each user is a node connected by edges to other nodes.
Facebook contains not just people, but things, such as businesses, musicians, politicians, etc. that can all be related to one another in various ways.
The underlying principle behind graph search is the idea that a user is not searching just for entities and if entities are connected, but also how these entities are related
facebook provides a few ways to query among nodes to discover things you are already connected to or new things you may be interested in
Query Interface
Solution: Natural Language Interface
“People who live in san francisco”
The segment “san francisco” is likely to be an entity of the {city} category
[start] => [users] $1
[users] => my friend friends(me)
[users] => friends of [users] friends($1)
[users] => {user} $1
[start] => [photos] $1
[photos] => photos of [users] photos($1)
Structure: Weighted Context-Free Grammar (WCFG) to represent the Graph Search query language