Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement search_after operator for pagination #52

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

m-Bilal
Copy link
Member

@m-Bilal m-Bilal commented Jan 22, 2025

Completes ENT-228

Design

search_after has been added as an argument to all collections

Review

  • Tests for queries with search_after are added in this commit. Please review the test cases (GQL queries) and the resulting Elasticsearch queries (want.json) to verify they're correct
  • Code implementation for query generation of search_after is in this commit
  • search_after being added as a collection argument and the resulting changes in the /schema of the connector can be reviewed in this commit

@m-Bilal m-Bilal force-pushed the m-bilal/ent-228-search-after-op branch 2 times, most recently from d294607 to 13e7923 Compare January 23, 2025 10:08
@m-Bilal m-Bilal force-pushed the m-bilal/ent-228-search-after-op branch from 13e7923 to 490430e Compare January 23, 2025 11:08
@m-Bilal m-Bilal marked this pull request as ready for review January 23, 2025 11:18
@m-Bilal m-Bilal force-pushed the m-bilal/ent-228-search-after-op branch from 0743118 to 48000f2 Compare January 23, 2025 11:38

// TODO: disable track_total_hits speeds up the query
// https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html
// query["track_total_hits"] = false
Copy link
Member Author

@m-Bilal m-Bilal Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been commented out because this is causing the connector to crash. Once we've delivered search_after, we could pick this up as a part of query optimization

@m-Bilal
Copy link
Member Author

m-Bilal commented Jan 23, 2025

Not yet tested with native queries

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