简体   繁体   English

Arango DB 查询限制不能超过 1000?

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

Is there a way to change the default limit of results in arango db?有没有办法更改arango db中结果的默认限制? I have a collection with > 1000 records, and it seems impossible to retrieve them all together.我有一个包含 > 1000 条记录的集合,似乎不可能将它们全部检索。

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).我正在使用带有节点的 arangojs 驱动程序,并且我还尝试在 arango Web 界面中运行简单查询(还将限制设置为 > 1000,它不会检索超过 1000 条记录)。

Other things that I've already tried:我已经尝试过的其他事情:

  • Get the full collection using arango functions使用 arango 函数获取完整集合

    db.collection("collection_name") .all().then(() => ...)
  • Run the query using arango functions without setting limits使用 arango 函数运行查询而不设置限制

 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.在所有情况下(包括最后一个),结果仅限于前 1000 条记录,就像它们没有存储在集合中一样。

Anyone that can helps?任何人都可以提供帮助? Thank you谢谢

1000 is the default cursor batch size. 1000 是默认的游标批量大小。 If you have more results, you have to fetch the additional batches.如果您有更多结果,则必须获取额外的批次。 The simplest way to do this is using all() .最简单的方法是使用all() For more details see the cursor documentation of the arangojs driver: https://www.arangodb.com/docs/stable/drivers/js-reference-cursor.html有关更多详细信息,请参阅 arangojs 驱动程序的光标文档: https ://www.arangodb.com/docs/stable/drivers/js-reference-cursor.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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