MATCH (p:Person) WHERE p.name =~ '(?i).test.*'
WITH p, {name: p.name} as person
return COLLECT(DISTINCT person) as persons
MATCH (p:Person) WHERE p.name =~ '(?i).test.*'
WITH p, {name: p.name} as person
MATCH (pla:Place) WHERE pla.name =~ '(?i).*test.*'
WITH person, {name: pla.name} as place
return COLLECT(DISTINCT person) as persons, COLLECT(DISTINCT place) as places
[
{
"name": null
}
]
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MATCH (p:Person) WHERE p.name =~ '(?i).*test.*'
return {persons: COLLECT(DISTINCT {name: p.name})} as results
UNION ALL MATCH (pla:Place) WHERE pla.name =~ '(?i).*test.*'
return {places: COLLECT(DISTINCT {name: pla.name})} as results
╒═════════════════════════════════════════════════════════════╕
│"results" │
╞═════════════════════════════════════════════════════════════╡
│{"persons":[]} │
├─────────────────────────────────────────────────────────────┤
│{"places":[{"name":"Test 1"},{"name":"Test 2"}]} │
└─────────────────────────────────────────────────────────────┘
╒═══════════════╤═════════════════════════════════════════════════╕
│"persons" │"places" │
╞═══════════════╪═════════════════════════════════════════════════╡
│[ ] │[{"name":"Test 1"},{"name":"Test 2"}] │
└───────────────┴─────────────────────────────────────────────────┘
{"name":null}
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.