Allow creating filters from fields with null values in discover#70936
Allow creating filters from fields with null values in discover#70936lizozom merged 11 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts
Outdated
Show resolved
Hide resolved
lukasolson
left a comment
There was a problem hiding this comment.
In playing around with this PR, I noticed that we aren't properly handling the case where the value is an array of multiple null values:
I also noticed that for missing fields, we don't show the add inclusive/exclusive filter buttons. We should probably make the behavior the same (show the filter buttons for adding exists/not exists filters).
src/plugins/data/common/index_patterns/index_patterns/flatten_hit.ts
Outdated
Show resolved
Hide resolved
src/plugins/data/public/query/filter_manager/lib/generate_filters.ts
Outdated
Show resolved
Hide resolved
…ers.ts Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
|
@elasticmachine merge upstream |
Allow filtering by a non existing field in the doc simplify flatten hit logic
|
@lukasolson resolved both issue you had suggested 🙇♀️ |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
kertal
left a comment
There was a problem hiding this comment.
Code Owner code LGTM 👍 , tested locally in Chrome, Firefox, Safari, MacOS 10.14.6. That a Filter For action for null/undefined value creates a "NOT exists" made me dizzy 💫 at the start, but it makes sense.
…tic#70936) * Fix bug elastic#7189 * typo * Test adjustments * wait for load complete * Fine tune test * Update src/plugins/data/public/query/filter_manager/lib/generate_filters.ts Co-authored-by: Lukas Olson <olson.lukas@gmail.com> * Fix filtering by an array of nulls Allow filtering by a non existing field in the doc simplify flatten hit logic Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
…#70936) (#71211) * Allow creating filters from fields with null values in discover (#70936) * Fix bug #7189 * typo * Test adjustments * wait for load complete * Fine tune test * Update src/plugins/data/public/query/filter_manager/lib/generate_filters.ts Co-authored-by: Lukas Olson <olson.lukas@gmail.com> * Fix filtering by an array of nulls Allow filtering by a non existing field in the doc simplify flatten hit logic Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> * improve test stability Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Summary
In discover, allow creating filters from fields with null \ undefined values.
The created filter is a exists filter.
This fix also includes fixing an issue with
flattenHitswhere empty array values are inserted into the field incorrectly.Functional test added as well.
Dev docs
Bug fix for #7189: Allow creating filters from fields with null \ undefined values.
Checklist
Delete any items that are not applicable to this PR.
For maintainers