Topic: [Question] Handeling order when using relative paging (before/after)

Posted under General

Hi, I'm the creator of the https://gitlab.com/TilCreator/e621_inline_bot, I make heavy use of relative paging (before/after).
The nice thing about that is that the changing list of posts doesn't affect the paging too much and it's easier to use ids for paging in Telegram.
The only problem with doing that is that the order tag doesn't work anymore. (see here: https://e621.net/wiki_pages/2425#posts_list)

I guess that the reason for not supporting order with relative paging is for performance reasons.

Can any developer show me a way / help me with still supporting the order tag or is the only way to implement both absolute (1-750) and relative (before/after) paging?

thx!

before/after paging is designed to allow moving through an entire result set in a stable manner, which is an additional reason why it ignores ordering(if you're consuming all results, you don't care about the order)

So if you care about order, then use page numbers and understand that they are not intended for viewing the full result set, just a subset of them.

The bot pretty much translates the e621 search to the Telegram inline search (with a bunch of rate limiting, timing control, caching and blacklisting), so querying a complete query is very improbable, so this should be fine.
I wish I had known about that limitation earlier, but that's on me for not fully reading updating documentation.

thx for the quick reply

Updated

  • 1