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

标签 lucene pagination couchdb

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

那么,还有其他方法可以使用 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/

相关文章:

lucene - 如何在 Lucene 搜索结果中进行分组?

javascript - 在 CouchDB 中摆脱 CORS?

ElasticSearch 在匹配查询中考虑词序

java - Lucene删除索引,Java

Laravel 5.4 分页与关系

c# - 分页数学问题

cakephp - 如何在cakephp中的$this->paginate()中传递自定义mysql查询?

load - CouchDB 转储到文件并从文件加载

couchdb - 与 CouchDB 连接/求和

java - 如何在Apache SOLR Cloud模式下加载原生库(.so)?