gpt4 book ai didi

lucene - 来自 couchdb-lucene 的分页结果

转载 作者:行者123 更新时间:2023-12-04 06:31:20 25 4
gpt4 key购买 nike

我可以轻松地对直接来自 couchdb 的结果进行分页(使用 startkey 和 limit),但看起来 couchdb-lucene 不处理请求中传递的“startkey”参数。我仍然可以使用“跳过”,但据我所知,这是不推荐使用沙发分页的方式。

那么,有没有其他有效的使用 couchdb-lucene 进行分页的方法?

最佳答案

我认为您正在寻找 couchdb-lucene 的 skiplimit查询参数。
引用 couchdb-lucene documentation

skip: the number of results to skip

limit: the maximum number of results to return


我意识到您试图避免处理所有跳过的文档,但核心 Lucene 没有为 couchdb-lucene 提供任何帮助:
引用 Apache Lucene documentation :

How do I implement paging, i.e. showing result from 1-10, 11-20 etc?

Just re-execute the search and ignore the hits you don't want to show. As people usually look only at the first results this approach is usually fast enough.

关于lucene - 来自 couchdb-lucene 的分页结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5389172/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com