- Notifications
You must be signed in to change notification settings - Fork28
Pagination using Filet Extension#301
-
Hello. I am using the filter extension to query my catalog and I was wondering how can I paginate the results. Can anyone help me please? Thank you in advance. |
BetaWas this translation helpful?Give feedback.
All reactions
At the bottom of the filter result is alinks
object. If there are more items in the search result that the limit number, there will be anext
link. That will open the next page of results.numReturned
andnumMatched
show the number of items in the page and the total number of search results, respectively.
"links": [ {"rel":"next","type":"application/json","method":"GET","href":"http://<stac api>/search?token=<next page token>" }, {"rel":"root","type":"application/json","href":"http://<stac api>/" }, {"rel":"self","type":"app…
Replies: 2 comments 2 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
At the bottom of the filter result is a "links": [ {"rel":"next","type":"application/json","method":"GET","href":"http://<stac api>/search?token=<next page token>" }, {"rel":"root","type":"application/json","href":"http://<stac api>/" }, {"rel":"self","type":"application/json","href":"http://<stac api>/search" } ],"numReturned":10,"numMatched":2670 |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hello@jamesfisher-geo and thank you for the reply. At first I made a request: URL: Data:
and received the following response
I tried to use the token as you suggested in a GET call but the result was not conclusive: https://localhost:8080/search?token=MTcyNjMwNTAxMTg2MixURVNUX1BBQ0tFVF85LGV1cF9wcm9kdWN0c190ZXN0
I suppose that this error come from the items cotained in another collection without bbox values. So, I tried to use the token inside the request data: URL: Data:
Which gave me the following response
The response contains another item compared to the first call, so it seemes to work fine, but if you look at the "next" session you will see that the token is the same as before, so I am not able to go forward. Am I missing something? And also, nother question: is there a way to jump directly to a specific page? Thank you very much S |
BetaWas this translation helpful?Give feedback.
All reactions
-
I believe the tokens are being created properly. Can you confirm that the you are able to paginate through the items? The two tokens you provided are just slightly different when I decode them from base 64. The API functions do not support jumping to a specific page, or previous pagination. This is a limitation of thesearch after pagination method of Elasticsearch/Opensearch. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Oh my god! It is a shame that there is no way to jump to specific pages, but I will find a way. Thank you very much. S |
BetaWas this translation helpful?Give feedback.