简体   繁体   English

Node.js mongodb本机驱动程序的“跳过”限制为23121

[英]Node.js mongodb native driver has a “Skip” limit of 23121

I'm using version 1.3.23 of the native mongodb native node driver: https://www.npmjs.org/package/mongodb 我正在使用本机mongodb本机节点驱动程序的1.3.23版: https ://www.npmjs.org/package/mongodb

I have to query around 180k of records so I wrote a script that throttles multiple paginated requests. 我必须查询大约18万条记录,因此编写了可限制多个分页请求的脚本。 The problem is, once skip hits anything over 23121 the response no longer returns results. 问题是,一旦跳过命中超过23121的任何内容,响应将不再返回结果。

If I hit my db directly I can return results with any valid skip value so this issue seems to be at the mongo driver level. 如果我直接打我的数据库,我可以返回任何有效的跳过值的结果,所以这个问题似乎在mongo驱动程序级别。

Do I just need to upgrade to v1.4.22 (I'm holding this off unless I absolutely need to)? 我是否只需要升级到v1.4.22(除非绝对需要,否则我就暂缓执行此操作)? Any suggestions would be appreciated. 任何建议,将不胜感激。

I would suggest using the CursorStream for large queries and I would also suggest upgrading to at least 1.4. 我建议对大型查询使用CursorStream,也建议至少升级到1.4。

http://mongodb.github.io/node-mongodb-native/1.4/api-generated/cursorstream.html http://mongodb.github.io/node-mongodb-native/1.4/api-generation/cursorstream.html

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

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