Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-05-2018 02:22 PM
Hi,
In this case i will limit one of the subquery.
When i run the query below, the result of the first query 'monitor' returns only one result and not five results.
I can do a slice on the collection, but i think that is not a hard limit in Neo, only for the return?
Is there some other option?
Query
WITH collect(distinct monitor) AS monitors
UNWIND(monitors) AS monitor
WITH monitor
SKIP 0 LIMIT 5
OPTIONAL MATCH (monitor)-[:FOLLOWS]->(capcode:TS_P2000Capcode)
WITH monitor, capcode
SKIP 0 LIMIT 1
WITH monitor, collect(capcode) AS capcodes
WITH {capcodes: capcodes, monitor: monitor} AS monitors
RETURN {monitors: monitors} AS result```
Solved! Go to Solution.
09-05-2018 02:37 PM
LIMIT applies to the number of rows, not the number of results per row, so LIMIT 5 means only 5 rows will be taken at that point.
We have a knowledge base entry here you may want to review for more options.
09-05-2018 02:37 PM
LIMIT applies to the number of rows, not the number of results per row, so LIMIT 5 means only 5 rows will be taken at that point.
We have a knowledge base entry here you may want to review for more options.
All the sessions of the conference are now available online