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

[Advanced Settings] Fix search does not work for terms with ":" #193506

Merged
merged 9 commits into from
Sep 25, 2024

Conversation

viajes7
Copy link
Contributor

@viajes7 viajes7 commented Sep 20, 2024

Summary

Fixes #192694

When terms with :, it will be transformed to a FieldClause.

So, I'm try to set it back to a TermClause if the field is not in FieldDefinition.

Example: -defaultValue:false doc_table:high Dashboard

image

@viajes7 viajes7 requested a review from a team as a code owner September 20, 2024 06:07
@viajes7
Copy link
Contributor Author

viajes7 commented Sep 20, 2024

@elasticmachine merge upstream

@viajes7 viajes7 changed the title [AdvancedSettings] Fix search does not work for terms with ":" [Advanced Settings] Fix search does not work for terms with ":" Sep 20, 2024
@alisonelizabeth alisonelizabeth added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes labels Sep 20, 2024
@alisonelizabeth
Copy link
Contributor

/ci

@viajes7
Copy link
Contributor Author

viajes7 commented Sep 21, 2024

@elasticmachine merge upstream

@viajes7
Copy link
Contributor Author

viajes7 commented Sep 23, 2024

@elasticmachine merge upstream

@viajes7
Copy link
Contributor Author

viajes7 commented Sep 23, 2024

@elasticmachine merge upstream

Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @viajes7! Tested locally and searching for settings that include : works well now. I have one suggestion regarding the check for the clause.

@viajes7 viajes7 force-pushed the fix/query_setting_fields branch from 0840de1 to efc4981 Compare September 24, 2024 09:56
@viajes7
Copy link
Contributor Author

viajes7 commented Sep 24, 2024

@elasticmachine merge upstream

Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the changes!

@ElenaStoeva ElenaStoeva added Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Sep 24, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@viajes7
Copy link
Contributor Author

viajes7 commented Sep 24, 2024

@ElenaStoeva Hi, I just pushed a commit, use the CATEGORY_FIELD constant. Please reivew the code(2a7f0b4).

On the other hand, docs-build-pr and kibana-ci need to be executed manually. Please have a look at it.

@ElenaStoeva
Copy link
Contributor

/ci

@ElenaStoeva
Copy link
Contributor

Hey @viajes7, thanks for using the CATEGORY_FIELD constant, latest changes lgtm!

Sure, I commented a prompt to re-run ci, hopefully it will pass this time.

@ElenaStoeva
Copy link
Contributor

/ci

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #4 / when rolling back to an older version kibana should detect that a later version alias exists, and abort

Metrics [docs]

Async chunks

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

id before after diff
advancedSettings 36.8KB 37.0KB +180.0B

History

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

@delanni
Copy link
Contributor

delanni commented Sep 25, 2024

@elasticmachine run docs-build

@ElenaStoeva ElenaStoeva merged commit b8398c7 into elastic:main Sep 25, 2024
21 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 25, 2024
…tic#193506)

## Summary

Fixes elastic#192694

When terms with `:`, it will be transformed to a `FieldClause`.

So, I'm try to set it back to a `TermClause` if the field is not in
`FieldDefinition`.

Example: `-defaultValue:false doc_table:high Dashboard`

![image](https://github.com/user-attachments/assets/e9519cfe-c64d-4bd4-b928-d6ffd9bfaa8b)

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Elena Stoeva <[email protected]>
(cherry picked from commit b8398c7)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 25, 2024
…ot;:&quot; (#193506) (#193965)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Advanced Settings] Fix search does not work for terms with
&quot;:&quot; (#193506)](#193506)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jusheng
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-25T10:36:25Z","message":"[Advanced
Settings] Fix search does not work for terms with \":\" (#193506)\n\n##
Summary\r\n\r\nFixes #192694\r\n\r\nWhen terms with `:`, it will be
transformed to a `FieldClause`.\r\n\r\nSo, I'm try to set it back to a
`TermClause` if the field is not
in\r\n`FieldDefinition`.\r\n\r\nExample: `-defaultValue:false
doc_table:high
Dashboard`\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e9519cfe-c64d-4bd4-b928-d6ffd9bfaa8b)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Elena
Stoeva
<[email protected]>","sha":"b8398c7b684d9fb4745c0d9d8c5a9c60a5eddc48","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Kibana
Management","Team:Kibana
Management","release_note:skip","💝community","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Advanced
Settings] Fix search does not work for terms with
\":\"","number":193506,"url":"https://github.com/elastic/kibana/pull/193506","mergeCommit":{"message":"[Advanced
Settings] Fix search does not work for terms with \":\" (#193506)\n\n##
Summary\r\n\r\nFixes #192694\r\n\r\nWhen terms with `:`, it will be
transformed to a `FieldClause`.\r\n\r\nSo, I'm try to set it back to a
`TermClause` if the field is not
in\r\n`FieldDefinition`.\r\n\r\nExample: `-defaultValue:false
doc_table:high
Dashboard`\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e9519cfe-c64d-4bd4-b928-d6ffd9bfaa8b)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Elena
Stoeva
<[email protected]>","sha":"b8398c7b684d9fb4745c0d9d8c5a9c60a5eddc48"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193506","number":193506,"mergeCommit":{"message":"[Advanced
Settings] Fix search does not work for terms with \":\" (#193506)\n\n##
Summary\r\n\r\nFixes #192694\r\n\r\nWhen terms with `:`, it will be
transformed to a `FieldClause`.\r\n\r\nSo, I'm try to set it back to a
`TermClause` if the field is not
in\r\n`FieldDefinition`.\r\n\r\nExample: `-defaultValue:false
doc_table:high
Dashboard`\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e9519cfe-c64d-4bd4-b928-d6ffd9bfaa8b)\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Elena
Stoeva
<[email protected]>","sha":"b8398c7b684d9fb4745c0d9d8c5a9c60a5eddc48"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jusheng Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) 💝community Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AdvancedSettings] Search does not work for terms with ":"
7 participants