Skip to content

search-after-support#259

Open
stefangutica wants to merge 2 commits intoSERVICES-2371-scroll-support-in-apifrom
search-after-support
Open

search-after-support#259
stefangutica wants to merge 2 commits intoSERVICES-2371-scroll-support-in-apifrom
search-after-support

Conversation

@stefangutica
Copy link
Copy Markdown
Contributor

Reasoning

  • Simplifies pagination by using a searchAfter cursor directly on the returned documents.
  • Keeps pagination deterministic by adding uuid.keyword as a tie-breaker when sorting is present.
  • Removes the need for any interceptor-based scroll flow.

Proposed Changes

  • Return searchAfter as a base64-encoded cursor on each item.
  • Decode searchAfter back into an array before building the Elasticsearch search_after query.
  • Automatically append uuid.keyword to the sort when needed.

How to test

  • Call a sorted list endpoint and verify each item includes searchAfter.
  • Pass the returned searchAfter value back into the next request and confirm the next page is returned.
  • Verify pagination still works when the query already contains sorting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant