MATCH (p:Person name: 'Charlie')-[:VISITED|KNOWS]->(common)<-[:VISITED|KNOWS]-(other:Person) WHERE p <> other RETURN other.name, count(common) AS similarity ORDER BY similarity DESC This returned unknown associates—perfect for expanding investigations. The agency integrated Neo4j with Kafka. Every new tip became a new relationship. A trigger query ran every minute:
“We need a faster way to follow relationships,” Alex said. neo4j in action pdf
“Three hops,” Alex whispered. “We can now predict risk chains.” Using collaborative filtering , Sam wrote a query to find people similar to a suspect based on shared locations and contacts: MATCH (p:Person name: 'Charlie')-[:VISITED|KNOWS]->