-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
[ML] fix model snapshot sorting when sorting by min_version #80596
[ML] fix model snapshot sorting when sorting by min_version #80596
Conversation
Pinging @elastic/ml-core (Team:ML) |
230bd8c
to
f2f7937
Compare
This shows that the deprecation checker should have multi-node tests :(. |
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
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
.from(from) | ||
.size(size) | ||
.trackTotalHits(true) | ||
.fetchSource(REMOVE_QUANTILES_FROM_SOURCE); | ||
SearchRequest searchRequest = new SearchRequest(indexName); |
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.
Could this fluent builder pattern be used here too?
SearchRequest searchRequest = new SearchRequest(indexName)
.indicesOptions(...)
.source(...)
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.
No necessarily, we use the default indices options created in the request.
GetModelSnapshotsAction.Request request = new GetModelSnapshotsAction.Request(jobId, null); | ||
request.setSort("min_version"); | ||
// Should not throw | ||
client().execute(GetModelSnapshotsAction.INSTANCE, request).actionGet(); |
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.
Would it make sense to add an assertion on the result?
Or are we satisfied just knowing it doesn't throw?
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.
Previously, it threw a search exception. I am satisfied (for expediency) for now.
…80596) When handling the missing field in sort builder, Version shouldn't be added directly, instead a string representation of the version concerned. closes: elastic#80561
…80596) When handling the missing field in sort builder, Version shouldn't be added directly, instead a string representation of the version concerned. closes: elastic#80561
When handling the missing field in sort builder,
Version
shouldn't be added directly, instead a string representation of the version concerned.closes: #80561