Skip to content

Elastic Search After Support#1597

Draft
stefangutica wants to merge 1 commit intodevelopmentfrom
search-after-support
Draft

Elastic Search After Support#1597
stefangutica wants to merge 1 commit intodevelopmentfrom
search-after-support

Conversation

@stefangutica
Copy link
Copy Markdown
Collaborator

Reasoning

  • Added support for deep pagination using searchAfter to avoid large-offset pagination limitations.
  • Aligned API behavior so searchAfter is used only on routes that actually reach Elastic list queries.
  • Prepared the implementation for the Elastic package update where getList natively supports searchAfter.

Proposed Changes

  • Propagated searchAfter through endpoint/service flows that reach elastic.indexer.service -> getList.
  • Added per-item cursor support so each returned entity includes its own searchAfter (base64) value.
  • Removed or avoided searchAfter on routes that do not use getList, to prevent misleading API behavior.
  • Kept changes compatible with the upcoming Elastic package update for explicit getList(..., searchAfter) support.

How to test

  • Call a getList-backed endpoint with size + searchAfter and verify the next page is returned correctly.
  • Verify each returned entity item contains a valid searchAfter (base64) cursor.
  • Confirm routes that do not use getList no longer rely on searchAfter.
  • After upgrading the Elastic package, re-run pagination tests to validate native searchAfter forwarding on getList.

@stefangutica stefangutica marked this pull request as draft April 7, 2026 13:23
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