Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-30-2022 04:27 AM
I have a query with APOC.PATH.EXPORT but I need to exclude recurring nodes.
I do not directly see the option in the export function.
Is my only option to use dependencies?
Solved! Go to Solution.
08-30-2022 11:07 PM - edited 08-30-2022 11:09 PM
08-30-2022 06:09 AM
Did you mean apoc.path,expand instead of export, as that is what is shown in your screenshot? If so, the expandConfig procedure has a uniqueness option, which can specify 'unique nodes' or 'unique relationships.' Sounds like you want to set this option to node to remove the duplicate node.
Another options is to use the following predicate to identify if a list does not have duplicate entries. The 'all' predicate will return true if 'list' does not contain duplicates, false otherwise.
with [1, 2, 3, 4, 2] as list
return all(x in list where size([i in list where i = x | 1])=1)
Or, since you are using apoc, you can try this instead:
RETURN size(apoc.coll.duplicates([1, 2, 3, 4, 2])) = 0
08-30-2022 11:02 PM
I'm trying to use uniqueness="NODE_GLOBAL" but no success.
Still have paths like ["V5.3", "HB-V5", "V5.3"] .
My paths are nodes with pipelines; So need to avoid circular paths.
08-30-2022 11:07 PM - edited 08-30-2022 11:09 PM
All the sessions of the conference are now available online