获取Elastic Enterprise和NodeJS使用的Elastic引擎的所有文档。

huangapple go评论76阅读模式
英文:

Fetch ALL document of an Elastic engine using Elastic enterprise and NodeJS

问题

我目前在NodeJS上使用'@elastic/enterprise-search'库时遇到了一个问题。
我有一个包含20,000个文档的Elastic引擎,我需要获取它们所有。

我尝试了很多方法,但无论分页和这个库提供的其他工具如何,似乎这个库在获取时都被限制在10,000个项目。

有人遇到类似的情况吗,或者有提出的替代解决方案来解决这个问题吗?

任何帮助将非常感激。

英文:

I'm currently facing an issue using the '@elastic/enterprise-search' library on NodeJS.
I have an Elastic engine containing 20 000 documents and I need to fetch all of them.

I tried a lot of stuff, but this library looks like capped at 10 000 items when fetching no matter the pagination and other tool that this library offers.

Does someone run into something similar or as a proposal alternative solution to overcome this issue?

Any help will be really much appreciated.

答案1

得分: 1

文档 明确指出
> ...最多 10000 个文档...

您可以绕过应用搜索层,使用标准的 ES 客户端库来滚动浏览整个底层索引。

英文:

The documentation clearly states
> ...up to 10000 documents...

What you can do is to bypass the app-search layer and use the standard ES client library to scroll over the entire underlying index directly.

huangapple
  • 本文由 发表于 2023年6月14日 23:25:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76475184.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定