-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update bool operator syntax for Elasticsearch simple_query_string and excludes #6405
Update bool operator syntax for Elasticsearch simple_query_string and excludes #6405
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6405 +/- ##
===========================================
+ Coverage 80.54% 80.59% +0.05%
===========================================
Files 233 233
Lines 5042 5077 +35
===========================================
+ Hits 4061 4092 +31
- Misses 981 985 +4 ☔ View full report in Codecov by Sentry. |
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.
Working for me, thank you so much @patphongs!
Thanks for your insights @rfultz, I think we can consider these changes more in depth in another ticket. Let me address each of your questions:
The pipe doesn't require spaces before and after, but I put it in there so the query is easier to read.
The plus sign doesn't require spaces before and after, but I put it in there so the query is easier to read also.
This is correct, the dash to exclude does require a space in front and 0 spaces after or else it will put in an additional dash in the space directly after.
Because we switched over to the standard analyzer and simple_query_string for the API, it's actually more forgiving with random chars like that. It would just ignore the curly quotes entirely. But you make a good point that a user may copy and paste and get confused. We shouldn't sacrifice styling for usability.
Interesting idea! I'd love to take a look at this further with you. Other upcoming changes
|
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.
Nice! I've been trying to break it and can't seem to!
For this ticket or a future one, could we add tests for gibberish, too, to make sure failures are handled properly? Mismatched parens (e.g. (
, )(
, )
, (…(
, )…)
), strange characters, too short, etc
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.
Tested on all effected pages, looks good. Thanks @patphongs.
Summary (required)
This updates the query string syntax that is used on the web UI as well as what is submitted in the API query string. Refer to the ticket for the syntax.
Required reviewers
1 Developer
1 UX
Impacted areas of the application
General components of the application that this PR will affect:
Related PRs
Related PRs against other branches:
How to test
npm run build
./manage.py runserver