[ML] Add runtime fields support#78700
Conversation
…fined in the mappings that is not present in _source
…fined in the mappings that is not present in _source
…fined in the mappings that are not present in _source
…elds-support # Conflicts: # x-pack/plugins/transform/public/app/hooks/use_index_data.ts # x-pack/plugins/transform/public/shared_imports.ts
|
Pinging @elastic/ml-ui (:ml) |
|
@elasticmachine merge upstream |
| values: { percent: NULL_COUNT_PERCENT_LIMIT * 100 }, | ||
| }), | ||
| }); | ||
| // add check so message won't be added if all values are null |
There was a problem hiding this comment.
if 100% of field valuess are null, why do we not want to report this?
There was a problem hiding this comment.
Sorry I should have been clearer in the comment.
Currently, if all values are null, the message we are giving back is: 'No examples for this field could be found. Please ensure the selected date range contains data.'
The added check here ensures we only give that one message back instead of both 'More than 75% of field values are null.' and 'No examples for this field could be found.'
There was a problem hiding this comment.
ok makes sense.
It think it might worth adding something to this comment for future readers. Something like:
If all values are null, VALIDATION_RESULT.NO_EXAMPLES will be raised.
So we don't need to display this warning as well
There was a problem hiding this comment.
Thanks. Updated the comment to be more explicit here. 219c661
| }, {} as EsSorting); | ||
|
|
||
| const { pageIndex, pageSize } = pagination; | ||
| // TODO: remove results_field from `fields` when possible |
There was a problem hiding this comment.
Is this TODO still necessary?
There was a problem hiding this comment.
The todo is necessary for now because we are getting the flattened fields.ml.blah as well as the unflattened _source.ml object. Since the fields API might change in the future to either return the values unflattened or add a way to exclude certain fields, maybe we can do a follow up PR for when the API changes.
alvarezmelissa87
left a comment
There was a problem hiding this comment.
Just left a small comment but LGTM ⚡
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
jgowdyelastic
left a comment
There was a problem hiding this comment.
Code LGTM, added a message about updating a comment.
💚 Build SucceededMetrics [docs]async chunks size
History
To update your PR or re-run it, just comment with: |
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
This PR is part of #77462 to add support for runtime fields. Instead of querying for fields using
_source, it instead uses the newfieldsAPI https://www.elastic.co/guide/en/elasticsearch/reference/master/search-fields.html#search-fields-param.However, there are some limitations. Because the values are returned as a flat list in the fields section in each hit, we are keeping the results field under
sourceto maintain the shape of the records.ML
_source_source(advanced wizard, jobs list)_source, failing at theNo examples for this field could be foundstep_sourceTransforms
Source data grid table cells are empty for runtime fields defined in the mappings that are not present in
_source(example belowresponsetimeplusis a runtime field)This was checked for cross-browser compatibility