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

Add sort to Single Document Response #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tallnato
Copy link
Contributor

we need to have the sort field so we can use for pagination with the search_after property

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Thanks for suggesting this! I'm not overly comfortable taking AnyCodable here primarily because it doesn't have a stable API to rely on. It also starts to get really difficult when we need to make things Sendable. A better approach would probably be with generics to allow a user to pass in the search document as a generic Codable type, similar to how Document works in ESGetSingleDocumentResponse.

The PR will also need tests

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.

2 participants