cursorMark是无状态的,以及它如何解决深度分页 [英] cursorMark is stateless and how it solves deep paging

查看:128
本文介绍了cursorMark是无状态的,以及它如何解决深度分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照指定的此处游标是无状态的,但我没有如果它是无状态的,那么它将无法解决深度分页问题. solr是否按唯一键字段按顺序存储索引数据,否则会澄清我的困惑.

as specified here cursormark is stateless but I don't get how it it is solving deep paging issue if its stateless. Does solr stores the indexed data in sort by unique key field if so then it will clarify my confusion.

如果我错了,请解释一下游标如何解决深度分页.因为游标是无状态的,所以每次请求查询时也需要对游标进行排序和区分,这类似于start =#start-position.

if I am wrong please explain how the cursormark solves deep paging. Because as cursormark is stateless it also need to sort and claculate cursormark every time request a query and this is similar to start=#start-position.

推荐答案

通过您引用的链接...

From the link you referenced...

Solr中的游标是一个逻辑概念,它不涉及在服务器上缓存任何状态信息. 取而代之的是,返回给客户的最后一个文档的排序值用于计算一个标记",表示排序值的有序空间中的逻辑点. 该标记"可以在后续请求的参数中指定,以告诉Solr从何处继续.

Cursors in Solr are a logical concept, that doesn't involve caching any state information on the server. Instead the sort values of the last document returned to the client are used to compute a "mark" representing a logical point in the ordered space of sort values. That "mark" can be specified in the parameters of subsequent requests to tell Solr where to continue.

在解释使用cursorMark ...的约束时将对此进行进一步阐述.

This is elaborated further in an explanation of the constraints on using cursorMark...

光标标记值是基于结果中每个文档的排序值计算的 ,这意味着具有相同排序值的多个文档将产生相同的Cursor标记值其中的一个是结果页面上的最后一个文档.在这种情况下,使用该cursorMark的后续请求将不知道应跳过哪些具有相同mark值的文档. 要求将uniqueKey字段用作排序条件中的子句,可确保将返回确定的顺序,并且每个cursorMark值将标识文档序列中的唯一点.

Cursor mark values are computed based on the sort values of each document in the result, which means multiple documents with identical sort values will produce identical Cursor mark values if one of them is the last document on a page of results. In that situation, the subsequent request using that cursorMark would not know which of the documents with the identical mark values should be skipped. Requiring that the uniqueKey field be used as a clause in the sort criteria guarantees that a deterministic ordering will be returned, and that every cursorMark value will identify a unique point in the sequence of documents.

如果这不能帮助您澄清问题,我可以提供的下一个最佳解释是将cursorMark视为已编码的 filter ,告诉Solr跳过排序字段中带有值的所有文档(根据asc/desc排序顺序)在之前"的一些特定值.

If this doesn't help clarify things for you, the next best explanation i can offer is to think of the cursorMark as an encoded filter telling Solr to skip all documents with values in the sort field(s) that come "before" (based on the asc/desc sort order) some specific values.

这篇关于cursorMark是无状态的,以及它如何解决深度分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆