-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[FEATURE][ML] Add setting for results field name #40927
[FEATURE][ML] Add setting for results field name #40927
Conversation
Pinging @elastic/ml-core |
This depends on elastic/ml-cpp#454 to be merged in |
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.
One minor comment about null
values.
parser.declareString(ConstructingObjectParser.constructorArg(), INDEX); | ||
parser.declareStringOrNull(ConstructingObjectParser.optionalConstructorArg(), RESULTS_FIELD); |
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.
declareStringOrNull
I think implies that the passed argument could be explicitly null
. This means results_field: null
is a valid payload. This does not make sense to me. It seems to be that it being optional is good so we can set the default, but allowing it to be explicitly null and then overwriting it seems strange to me.
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.
Ah, yes! Good spot! I got tricked to think it was the method to use for optional fields.
Jenkins run elasticsearch-ci/2 |
Jenkins run elasticsearch-ci/packaging-sample |
run elasticsearch-ci/2 |
7ae73a3
to
e731d06
Compare
Adds a field in the config `dest.results_field` which defaults to `ml`. Results will be written into an object that is named after the results field. In addition, upon starting the analytics there is now validation that the source index does not already have a field matching the results field name. This allows composability of different analytics runs.
Adds a field in the config
dest.results_field
whichdefaults to
ml
. Results will be written into an objectthat is named after the results field. In addition,
upon starting the analytics there is now validation that
the source index does not already have a field matching
the results field name.
This allows composability of different analytics runs.