What is the expected behaviour for paging within search results around the time of a data change? Is this considered a specification concern, or is it at the discretion of the implementer? Can this be documented?
For example:
- Caller executes a search where result size >
limit
- STAC API returns
next link
- Data change occurs which alters the content or sort order of the search
- Caller requests the
next link
The following all seem like viable options:
- continue as if nothing has changed, potentially resulting in
- an empty result set or error if the caller pages "off the end" of a result set which has reduced in size
- a gap in the data where the first item of the
next page no longer follows the last item of the previous page because sort order has changed either due to new items or changes to existing items
- repeated data from an earlier page because sort order has changed either due to new items or changes to existing items
- page according to the state of the result set at the time of the initial search, potentially requiring long-lived or expensive data snapshots
- return a 4xx response informing the caller that their request is no longer valid. Several 4xx status codes could be appropriate here
Any thoughts much appreciated.
What is the expected behaviour for paging within search results around the time of a data change? Is this considered a specification concern, or is it at the discretion of the implementer? Can this be documented?
For example:
limitnextlinknextlinkThe following all seem like viable options:
nextpage no longer follows the last item of thepreviouspage because sort order has changed either due to new items or changes to existing itemsAny thoughts much appreciated.