0
votes

In order to prevent my path from including the same node more than once, I'm looking to be able to set the uniqueness to NODE_PATH either using the .Net Neo4jClient or at the database level in one of the database config files (which, last I heard, wasn't possible).

If this can be done, I'm almost certain it will solve this problem as well:

Cypher Query in Neo4j Returns 'undefined'

Thanks for any help!

Brent

1
i'm afraid you question is not completely understandable. could you please provide at least a part of your query you are using now, and the goal you want to have at the end of the query?ulkas
Uniqueness as in the traversal framework (docs.neo4j.org/chunked/stable/…) is not yet exposed in Cypher. It's in the plans though.Peter Neubauer
@PeterNeubauer (as well as ulkas), thanks for the response. Yeah, that's exactly what I was talking about. My graph is a flight network so you can imagine how many paths there are to any particular node (airport). Currently I'm running out of memory, but even if I gave the machine more, with all the repeating nodes in the paths, the traversal would take way too long. If I understand correctly, maybe I can use the REST API to set the uniqueness and then get my data that way. Any idea how soon cypher might support this? Thanks again for being such a great resource here!Brent Barbata

1 Answers

0
votes

Brent,

You could use Cypher's CREATE UNIQUE clause to create the relationship:

http://docs.neo4j.org/chunked/1.9.M05/query-create-unique.html#create-unique-create-relationship-if-it-is-missing

If it already exists, it won't do anything.

-- Tatham