Neo4J with APOC and MongoDB Driver, limiting returned records from Mongo

28 views
0

Limiting the number of returned records in MongoDB is as simple as
db.collection.find().limit(n).
However I’d like to issue the equivalent query from Neo4J.

Given that a find query is issued from Neo4J as follows…
apoc.mongodb.find(host, db, collection, query, project, sort)
I find it difficult to see how one should tell the MongoDB instance to limit the returned results before streaming to Neo4J.

I am aware of Cypher’s LIMIT clause, however, this feels like bad practice, considering the amount of redundant data that will be streamed from Mongo.

Is there yet a way of adding a limit to the query results pre-stream?