I am querying an index that lists documents from a collection based on the the epoch time and a unique constraint.
If I want to retrieve a list of the latest 80 documents I am using the following query:
result = client.query(
q.paginate(
q.reverse(
q.match(
q.index("Epoch_Index"))), size=80)
)
How do I retrieve the 80th document only without using the ‘size=80’ command and parsing the results? Surely there is a more fauna-tic way to achieve this?
You cannot get around paginating and fetching until you have 80 items back.
If you use Reverse on the Set (before Paginate) you will reverse the entire index, and get the last item. But you can use Reverse on a Page and then get the first item.