-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[HealthAPI] Add size parameter that controls the number of affected resources returned #92399
Conversation
…esources returned This adds a `size` parameter that controls the maximum number of returned affected resources. The parameter defaults to `1000`, must be positive, and less than `10_000`
Documentation preview: |
Pinging @elastic/es-data-management (Team:Data Management) |
Hi @andreidan, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I left one question about limiting the maximum size, what do you think?
} else if (size > 10_000) { | ||
validationException = addValidationError("Cannot request more than 10_000 affected resources", validationException); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a little strange to constrain this artificially, I understand having a reasonable default, but we don't limit the max number of search results or other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that's a good point. Especially now that we chunk the response the clients will have a better experience with larger responses anyway.
but we don't limit the max number of search results or other places.
I guess we sort of do in the context of pagination https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window, but maybe we should cross that bridge when/if we get there.
I'll drop the upper bound
@elasticmachine run elasticsearch-ci/packaging-tests-unix-sample |
This adds a
size
parameter that controls the maximum number of returned affected resources. The parameter defaults to1000
and must be positiveCloses #91930