cursorMark 是无状态的,它是如何解决深度分页的
cursorMark is stateless and how it solves deep paging
如指定的那样here cursormark 是无状态的,但如果它是无状态的,我不明白它是如何解决深度分页问题的。 solr 是否按唯一键字段排序存储索引数据,如果是这样,那么它将澄清我的困惑。
如果我说错了请解释光标标记是如何解决深度分页的。因为 cursormark 是无状态的,所以它也需要在每次请求查询时对 cursormark 进行排序和计算,这类似于 start=#start-position.
来自您引用的 link...
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 的限制的解释中进一步阐述...
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 跳过所有文档排序字段中的值 "before"(基于 asc/desc 排序顺序)一些特定值。
如指定的那样here cursormark 是无状态的,但如果它是无状态的,我不明白它是如何解决深度分页问题的。 solr 是否按唯一键字段排序存储索引数据,如果是这样,那么它将澄清我的困惑。
如果我说错了请解释光标标记是如何解决深度分页的。因为 cursormark 是无状态的,所以它也需要在每次请求查询时对 cursormark 进行排序和计算,这类似于 start=#start-position.
来自您引用的 link...
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 的限制的解释中进一步阐述...
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 跳过所有文档排序字段中的值 "before"(基于 asc/desc 排序顺序)一些特定值。