-
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
[GS] Advanced search syntax to fine tune results returned #74290
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/kibana-core-ui (Team:Core UI) |
Functionally, this makes sense imho. technically, we will need a definitive syntax before starting to implement a parser. Depending on the requested syntax features, this may be non-trivial. |
I vouch for using PEG.js to generate a parser/lexer from a formal grammar spec. We have prior art here in the expressions / interpreter code which uses the same library for parsing canvas expressions. |
We've been doing some work to line up all the GS requests thus far in anticipation of prioritizing work beyond 7.10. We'll obviously need your input as we have those discussions. Related, I've started a GH project to track ongoing work for this feature: https://github.com/elastic/kibana/projects/65 |
the syntaxSo, after thinking a little about it, maybe we should be using EUI's
Note that this syntax is slightly different than the one suggested
the features / filters we can provideFYI, The query documentation is available here: https://elastic.github.io/eui/#/forms/search-bar. Technically, for the SO result provider, we have two options: (The easy one) using the
|
My prevailing thought, as I read through your comment, was that we should lean towards a simple filtering experience as opposed to a query-writing experience. I believe the latter would generate confusion with the existing search query UIs and, frankly, introduces what feels like an unnecessary learning curve to this search UI. Perhaps there's a future state where these are one in the same but, until then, I think it would be wise to maintain our current navigation-oriented focus and not mix purposes. Given that, I favor (The easy one) using the search, type, references searchField options of the find API. option.
+1 for avoiding this
Definitely an important topic. We can do some design work around this. |
ping @alexfrancoeur I would like your opinion before starting a POC. |
Thanks for detailing out @pgayvallet and I apologize for the delayed response. I can understand how my original examples raised some additional questions. I'd like to ensure that the foundational steps we take for the initial implementation can grow to support additional result providers (#72680, #74283). Search today, includes applications, saved objects and one feature (lens). In the future, we'll have more features and ideally, navigational entities. It feels to me like Using EUI syntax and with some of the assumptions made above, I'm going to try and put together some simplistic examples of syntax that help highlight the types of navigation I'd like to see navigational search support.
I'll answer some questions below, and am generally in favor of the easy one, but have an open question around filtering on multiple tags.
For the most part, I think it's a good first step. But we'll eventually want to support more complex queries like
I agree that this would work, but how or can this work with tags? Do we believe that tags will be its own filterable component or an additional type? Given that we can support multiple tags, I'd imagine the need for searches like
In addition to a quick link to documentation, a user specific product tour (all future features) could help with education. Could / should we support autocomplete? Maybe not initially, but in the future, that's a good way to learn syntax. |
You probably meant
The first 3 would be possible to implement for
Not sure what this query is supposed to do? Return all dashboard assigned to tag If that was meant to return dashboards matching
From the discussions in #81846, tags are only going to be a filter, not an additional type. Where would we be redirecting the user to if we had
👍 |
This clears up most of the questions I had. Specifically around requirements for supporting filtering on different values by type. I'm good with these requirements to kick off a POC. It will be interesting to see how this can evolve to support future requirements for search, but I love that we're providing the capabilities to fine tune the results. Thanks for leading the charge here @pgayvallet ! |
Ok great, I will take a shot at it then |
After a very quick look and test, my first observation is that advanced search syntax does not really play well with the 'suggestion' type searchbar we are currently using for the navigational search (the fact that we refresh the results live on keypress, instead of requiring the user to press enter to trigger the search). A quick example: the user want to type
The main significant problems are step 1 and 2 imho. That made me look a little on other products that are using/allowing advanced syntax in a single search field / search bar. I did not find any that was using complex syntax in workflows that also use 'live' results (refresh results while the user is typing). That makes me wonder if we are really going with the right functional decision here. Alternatives I could see:
I think the second option would make sense, as it sounds acceptable for users wanting to perform some 'complex' search to be redirected to a specific page to do so, and as it would allow us to keep the KISS implementation of the navSearch bar while handling the 'more complex searches' need. Note that I'm also good with just going with the current poposal. But maybe this 'advanced search' page could be a great (later?) improvement to the nav search. @ryankeairns @alexfrancoeur @MichaelMarcialis @joshdover wdyt? |
@pgayvallet: I personally don't think the live, on keypress results are a bad thing in conjunction with the proposed advanced search syntax. If the user were to type |
I agree with Michael's response. It seems we've taken note of the same experiences. My mind went immediately to Google Drive. They have found a nice balance between live results and advanced syntax. For discoverability and curated filter experiences, I think there are other UI/UX we might evolve to support (advanced search, type filters listed below) but live results + query syntax feels like it's accepted behavior. As you type in Google Drive, results are returned in real time. But as soon as you've completed your filter, the expected results are shown below. The largest difference I see here is the speed at which the results are returned, it feels pretty seamless with each keystroke. As an end user, I imagine that performance plays a large role in this UX. They handle discoverability of the features with the "types" at the bottom. Though, one difference that's been previously called out is that they do have a dedicated results view. I could see this working for our use case without a dedicated view. There is also an inline advanced search option that can build out a query. Another option to explore and a way to learn the syntax. Unrelated / related question - have we done any "load testing" on query results? If there are thousands of saved objects, what does performance look like? |
Got it, will continue with the initial proposal then. I made some progress on the implementation, however I'm currently stuck due to the searchbar's internal EUI component we are using. See #83422 (comment) |
FYI, #83422 is ready for review. |
Created:
|
Closing this as #83422 has been merged and as the follow-ups are listed in the |
Assuming we end up adding more granular search results (#72680, #74283) we'll likely want a way to narrow down the search even further. Adding some sort of simple syntax will likely be necessary to fine tune navigation. Some examples below:
metrics: aws-host2
cases: malware and cases:open
dashboards: soc
I think this will only be necessary as we introduce new result providers to navigational search. We'll also need to make sure we get the UX / syntax right.
Improvements / follow-ups:
tag:xxx
ortype:xxx
filter suggestion option #83888type
filter (canvas-workpad
->canvas
/workpad
)[GS] allow type 'alias' for search syntax #83889The text was updated successfully, but these errors were encountered: