Skip to content
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

[UnifiedDocViewer] Field search via wildcard #168616

Merged
merged 12 commits into from Oct 18, 2023

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Oct 11, 2023

Summary

This PR allows to search in DocViewer not only for partial matches but also for wildcard matches.

Screenshot 2023-10-11 at 16 51 36 Screenshot 2023-10-11 at 16 51 48 Screenshot 2023-10-11 at 16 52 24

Checklist

@jughosta jughosta added release_note:enhancement backport:skip This commit does not require backporting Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) Feature:UnifiedDocViewer Issues relating to the unified doc viewer component labels Oct 11, 2023
@jughosta jughosta self-assigned this Oct 11, 2023
@jughosta
Copy link
Contributor Author

@elasticmachine merge upstream

@jughosta jughosta marked this pull request as ready for review October 13, 2023 16:09
@jughosta jughosta requested a review from a team as a code owner October 13, 2023 16:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement and works great, thanks!

@@ -9,7 +9,7 @@
import { escapeRegExp, memoize } from 'lodash';

const makeRegEx = memoize(function makeRegEx(glob: string) {
const trimmedGlob = glob.trim();
const trimmedGlob = glob.trim().toLowerCase();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have an impact? It looks like we use the i modifier below when constructing the RegExp anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davismcphee True, updated via d4cfdf9

@jughosta jughosta enabled auto-merge (squash) October 18, 2023 13:29
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Investigations - Security Solution Cypress Tests #5 / Fields Browser Editing the timeline "before each" hook for "removes the message field from the timeline when the user un-checks the field" "before each" hook for "removes the message field from the timeline when the user un-checks the field"
  • [job] [logs] Investigations - Security Solution Cypress Tests #5 / Timeline Discover ESQL State "before each" hook for "should have the default esql query on load" "before each" hook for "should have the default esql query on load"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cloudSecurityPosture 379 380 +1
dataVisualizer 571 572 +1
unifiedDocViewer 112 113 +1
total +3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/field-utils 22 28 +6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 575.9KB 575.9KB +10.0B
lens 1.4MB 1.4MB +6.0B
unifiedDocViewer 57.9KB 58.4KB +471.0B
total +487.0B
Unknown metric groups

API count

id before after diff
@kbn/field-utils 28 36 +8

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jughosta

@jughosta jughosta merged commit 54fd403 into elastic:main Oct 18, 2023
29 checks passed
benakansara pushed a commit to benakansara/kibana that referenced this pull request Oct 22, 2023
- Closes elastic#168607

## Summary

This PR allows to search in DocViewer not only for partial matches but
also for wildcard matches.

<img width="400" alt="Screenshot 2023-10-11 at 16 51 36"
src="https://github.com/elastic/kibana/assets/1415710/ec5dc57f-e540-48c6-b43c-d79d64ef1809">
<img width="400" alt="Screenshot 2023-10-11 at 16 51 48"
src="https://github.com/elastic/kibana/assets/1415710/c68a3b70-c195-4da9-bb0c-12ca38db269c">
<img width="400" alt="Screenshot 2023-10-11 at 16 52 24"
src="https://github.com/elastic/kibana/assets/1415710/d2d37976-559d-4cc3-852f-5ad3175808cc">


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
benakansara pushed a commit to benakansara/kibana that referenced this pull request Oct 22, 2023
- Closes elastic#168607

## Summary

This PR allows to search in DocViewer not only for partial matches but
also for wildcard matches.

<img width="400" alt="Screenshot 2023-10-11 at 16 51 36"
src="https://github.com/elastic/kibana/assets/1415710/ec5dc57f-e540-48c6-b43c-d79d64ef1809">
<img width="400" alt="Screenshot 2023-10-11 at 16 51 48"
src="https://github.com/elastic/kibana/assets/1415710/c68a3b70-c195-4da9-bb0c-12ca38db269c">
<img width="400" alt="Screenshot 2023-10-11 at 16 52 24"
src="https://github.com/elastic/kibana/assets/1415710/d2d37976-559d-4cc3-852f-5ad3175808cc">


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:UnifiedDocViewer Issues relating to the unified doc viewer component release_note:enhancement Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UnifiedDocViewer] Support wildcard fieldname search
6 participants