Smart Fields (originally implemented here: https://github.com/elastic/kibana/pull/177626) should be migrated to the Discover codebase, this includes the actual virtual columns code (e.g. for resource and content) as we need to be able to render and display those fields if they are selected.
For the initial version of this code pushdown we will lean on the current customisation framework to say "yes, render logs fields". This will only be a temporary stopgap until the data type contextual awareness is live in Discover.
Reviews
(See also tasklist)
To keep the reviews smaller and simpler this will likely be split in to multiple pieces (this will also assist with PTO landing in the middle):
Pushdown into Discover whilst maintaining feature parity (this will mostly involve files moving rather than new code)
Move functional tests (this will come at a later stage as we will need the real contextual awareness in Discover, at first tests can stay in Logs Explorer)
Fix bugs listed below
Bugs
Either in the initial PR or followup PRs we should also fix bugs caused by Smart Fields:
Smart Fields can be selected in the Unified Field List
When Smart Fields are selected their content (virtual columns) can be rendered
The code for this should live in Discover (bar the data type decision, which will temporarily fall to Logs Explorer still)
Image reference:
### Tasks
- [x] [Part one] Move code to Discover (with temporary / rudimentary context decisions based on current extension framework).
- [ ] [Part two] Hook up data type decisions to the new context awareness once implemented.
- [ ] [Part three] Amend tests (functional tests that exist in Logs Explorer should move to Discover once context awareness lands)
- [x] [Part four] Fix bugs (see description)
- [ ] [Part five] Follow up on async chunk size increases in https://github.com/elastic/kibana/pull/184172
Summary
Smart Fields (originally implemented here: https://github.com/elastic/kibana/pull/177626) should be migrated to the Discover codebase, this includes the actual virtual columns code (e.g. for resource and content) as we need to be able to render and display those fields if they are selected.
For the initial version of this code pushdown we will lean on the current customisation framework to say "yes, render logs fields". This will only be a temporary stopgap until the data type contextual awareness is live in Discover.
Reviews
(See also tasklist)
Bugs
Either in the initial PR or followup PRs we should also fix bugs caused by Smart Fields:
Acceptance Criteria:
Image reference: