Unicorn also supports a Difference operator, which re-turns results from the first operand that are not present in the second operand. Continuing with the example above, we could find female friends of Jon Jones who are not friends of Lea Lin by using (difference (and friend:5 gender:1) friend:6). As demonstrated by the query above, Unicorn operators support composition, which allows us construct complex queries to create interesting views of the social graph.

More from Facebook

View all quotes →