-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Default to match_all instead of query_string #12785
Conversation
jenkins, test this |
@@ -67,17 +67,16 @@ describe('parse-query directive', function () { | |||
}); | |||
|
|||
it('unless the object is empty, that implies a *', function () { |
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.
Maybe the test case names should be updated to reflect the change.
the test failure looks unrelated, rebasing on master might fix it |
If you save a dashboard with no filter in it (so that it uses the default match_all) and then re-open the dashboard, it will have a match_all filter in the filter bar. I think that is happening because getFilterBarsForDashboard in https://github.com/lukasolson/kibana/blob/2368e67031425440b03bd1c9dbe71330922136f1/src/core_plugins/kibana/public/dashboard/filter_utils.js#L48 isn't removing the default match_all filter. |
Instead of trying to update this at the view layer, what if we transformed |
I also just remembered, we need to recognize that this is a breaking change for people who have a default_field set. With a default field set |
As @Bargs mentioned, there is the fallback condition in _abstract. This is why, when you first load Kibana, you'll actually get a We talked about this and ultimately decided to go with the following: When you first load discover, the default query will remain This will make the behavior more intuitive and reliable, with less implicit behavior. |
@lukasolson, don't remove that condition about the '*'. It was added to both ensure that the help text was visible and to prevent users from accidentally typing in a regex. #10272 and #10565 are both related to it. |
@trevan, remember the discussion we had awhile back about the default query being a The difference in behavior will only be apparent to users with existing saved searches where the query is |
@lukasolson, if I add something to the query and then blank it out, will it go to match_all or to *? If to match_all, then that might be fine. You'll want to add some "breaking changes" or something to indicate that people need to go back through all their saved searches and change it from * to blank. Otherwise, they will start seeing * again when they currently don't see it and people might, once again, run regex searches. |
@trevan I'm proposing that if a user blanks it out, then it will be a |
Fixes #12097.
This PR simply changes the default query from
to
In certain cases, this helps the first query to return much faster, which means you can get to exploring your data without having to wait.