-
Notifications
You must be signed in to change notification settings - Fork 8.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
[Discover] Fix adding a filter for scripted fields via Document Explorer cell actions #130895
[Discover] Fix adding a filter for scripted fields via Document Explorer cell actions #130895
Conversation
…ent Explorer view
4c67cc5
to
3c79c71
Compare
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
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.
Code LGTM, thx for fixing this so quickly 🚅 ! Even if we are fixing 🚂 . Tested with cloud deployment, works as expected now 👍
mode: '+' | '-' | ||
) { | ||
const row = context.rows[rowIndex]; | ||
const flattened = flattenHit(row, context.indexPattern); |
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.
just a side note, unrelated to this PR: we should not flatten our hits in the UI, too much flattening is being done a various places in Discover. We should migrate this to something like
data being fetched -> data being prepared (flattened) -> UI
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.
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.
great, thanks!
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…ent Explorer view (elastic#130895) (cherry picked from commit 60049fd) # Conflicts: # src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.tsx
… Document Explorer view (#130895) (#130996) * [Discover] Fix adding/removing a filter for a scripted field in Document Explorer view (#130895) (cherry picked from commit 60049fd) # Conflicts: # src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.tsx * [Discover] Revert paths for backporting
…ent Explorer view (elastic#130895)
Closes #130751
Summary
This PR fixes adding filters when user clicks on "Filter for"/"Filter out" buttons in the new Document Explorer grid. Now field types will be considered and scripted fields will be properly handled in the search request. A similar implementation for the legacy table view can be found here.
How to test:
return "test";
value+
/-
cell actions for Document Explorer and the legacy table view. It should trigger ES queries withscript
filter. Same behaviour should be for+
/-
in Document Explorer flyout.Checklist