简体   繁体   中英

Arango DB query limit can't be more than 1000?

Is there a way to change the default limit of results in arango db? I have a collection with > 1000 records, and it seems impossible to retrieve them all together.

I'm using the arangojs driver with node, and I've also tried to run the simple query into the arango web interface (also setting the limit > 1000, it won't retrieve more than 1000 records).

Other things that I've already tried:

  • Get the full collection using arango functions

    db.collection("collection_name") .all().then(() => ...)
  • Run the query using arango functions without setting limits

 let query = `FOR document in vehicles
                  RETURN document`;
  db.query(query)
      .then(() => ...)
  • Run the query trying to paginate results
  let query = `FOR document in vehicles
                   LIMIT 1000,2000
                   RETURN document`;
   db.query(query)
       .then(() => ...)

In all the cases (including the last one) the results are limited to the first 1000 records, like they aren't stored in the collection.

Anyone that can helps? Thank you

1000 is the default cursor batch size. If you have more results, you have to fetch the additional batches. The simplest way to do this is using all() . For more details see the cursor documentation of the arangojs driver: https://www.arangodb.com/docs/stable/drivers/js-reference-cursor.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM