Indeed, it will not work so well in situations you describe. But on the other hand you can then expand the search to "friends of friends" and so on.. then at some point it will be less relevant, but at least in theory this is how you can expand your search..
"Six degrees of separation is the idea that all people are six or fewer social connections away from each other. As a result, a chain of "friend of a friend" statements can be made to connect any two people in a maximum of six steps. It is also known as the six handshakes rule."
https://en.wikipedia.org/wiki/Six_degrees_of_separation