Storing particular paths as named variables (perpetually)

is there a way to 'store' specific paths as variables / references?


(a)-[R]->(b)-[S]->(z) is stored as path1 (rl example 'LA to New York via Atlanta')
(a)-[T]->(c)-[U]->(w)-[V]->(z) is stored as path2 (rl example 'LA to New York via Dallas and Miami')

This example (just like my use case) the same 'origin' / 'destination' can have multiple 'valid' paths, but it's vital to detail the exact path that particular use-case takes.
Having these alternative paths stored against variable names for easy referencing querying etc.
Even if stored as a json doc or anything - or can be stored directly into the database somehow?
(am struggling with google / searching due to difficult / overlapping terminology here)
Many thanks

Cypher supports storing specific paths in a variable like this

MATCH p=(a)-[R]->(b)-[S]->(z)

The path(s) returned by the search are stored in the variable p.

You mentioned 'specific path' but I suspect by your example that you might be looking for a way to store the 'path search pattern'? Like an alias I guess? Where are you running this query? In Neo4j Desktop? Saving cypher is easy to do in application code, the cypher is just a string.

Here is one solution that I provided in an earlier post. Check this: