monarch-initiative / monarch-cypher-queries

4 stars 3 forks source link

Replace unions with collect unwind #33

Closed kshefchek closed 5 years ago

kshefchek commented 5 years ago

Replaces UNION queries with COLLECT in order to sort the results, see https://neo4j.com/blog/cypher-union-query-using-collect-clause/

Note that a downside of this is that if any path returns 0 rows the whole query returns 0 rows. I ran into a handful of our path patterns that return 0 rows and commented them out. We'll likely want to circle back to figure out why these are no longer returning data.

See https://github.com/SciGraph/golr-loader/pull/48