Home / Companies / Neo4j / Blog / Post Details
Content Deep Dive

I Would Walk 500 Miles

Blog post from Neo4j

Post Details
Company
Date Published
Author
Christoffer Bergman
Word Count
2,638
Language
English
Hacker News Points
-
Summary

Christoffer Bergman, Director of Engineering at Neo4j, introduces a new match mode in Cypher, called REPEATABLE ELEMENTS, which allows revisiting relationships in graph queries, enhancing the traditional DIFFERENT RELATIONSHIPS mode that restricts such revisits. This capability is especially useful in scenarios like finding flight routes in a global airport dataset, where traversing the same connections multiple times can help solve complex queries. For instance, it allows finding multiple travel paths from Malmö Airport or overcoming the limited connectivity of Ísafjörður Airport in Iceland. The blog post demonstrates how REPEATABLE ELEMENTS can optimize travel itineraries for mileage runners or facilitate visits to various destinations with constraints on the number of flights. Bergman illustrates the use of this feature through detailed examples, explaining its potential to address challenges that were previously unsolvable due to the limitations of the traditional match mode.