Currently, I have a YQL query that successfully combines multiple RSS feeds and then sorts them by date. While this is effective, I am interested in implementing pagination to manage the results more efficiently.
Below is the existing query I'm working with:
select channel.item.title, channel.item.link, channel.item.pubDate, channel.item.description(0) from xml where url in(... urls go here ...) | unique(field='channel.item.link') | sort(field='channel.item.pubDate', descending='true')
The issue at hand is that YQL executes LIMIT and OFFSET before the sorting filter. Therefore, if I set a LIMIT of 5, I only retrieve the first 5 items from the initial RSS feed rather than the first 5 items across all combined feeds.
I am curious if there is a way to chain queries together so that I can first sort all my results and then apply a query to limit the number of results returned.
Any assistance on this matter would be greatly appreciated.