gpt4 book ai didi

python - Google App EngineSearch API 中的分页

转载 作者:太空狗 更新时间:2023-10-29 23:59:14 24 4
gpt4 key购买 nike

我想在 google app engine search api 中使用游标(不偏移)进行分页。向前分页很简单,问题是如何实现向后分页。

最佳答案

我猜你在使用游标向后翻页时运气不好。

The Search API also supports the use of query cursors. Cursors are another way to indicate the point from which to begin a query, allowing you to continue a search from the end of the previous result set. Using a cursor is generally more efficient than using offsets. However, the Search API doesn't currently support a "reverse cursor" as does the Datastore API, making it more difficult to to implement backward paging. For this reason, the example application uses offsets rather than cursors to paginate its query results. You can find an example using cursors here.

source

关于python - Google App EngineSearch API 中的分页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21545635/

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