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

Allow any character to be used in Query #3432

Conversation

chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented May 6, 2020

Summary

Closes #2325 and closes #3426

  • Updated query syntax to allow any character inside double-quoted phrases; " and \ characters must be escaped with a backslash
  • Added unit test covering AST->ES DSL generation when a " or \ is present
  • Updated AST -> ES querystring conversion and added a unit test to escape " and \ characters

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples

  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

@cjcenizal
Copy link
Contributor

This is going to be so awesome. ES UI tables break whenever & is filtered on using =.

@naderhen
Copy link

@chandlerprall is there anything I can do to help get this over the line?

@chandlerprall chandlerprall force-pushed the feature/2325-allow-arbitrary-characters-in-phrases branch from 3a20cfa to 2a4d538 Compare June 30, 2020 15:56
@chandlerprall
Copy link
Contributor Author

@naderhen thanks for the reminder :) I was out last week, but am back to working on this.

Just pushed a refactor of the change to maintain backwards compatibility, better parsing, and correct pretty value printing of these values. Also added a unit test. Remainder of work is to validate the generated ES query string & DSL is correct. I should have this in a completed state soon.

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

@chandlerprall chandlerprall marked this pull request as ready for review June 30, 2020 18:48
Copy link
Contributor

@bevacqua bevacqua left a comment

Choose a reason for hiding this comment

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

🎉

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

1 similar comment
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3432/

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM!

@geeklisted
Copy link

Will this fix be available soon?

@chandlerprall
Copy link
Contributor Author

Will this fix be available soon?

This was included in the v26.2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants