-
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] SavedObject results provider #65222
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/kibana-core-ui (Team:Core UI) |
I don't think it makes sense for all saved objects to have a title, so it feels like it's better to keep this in the type attributes than to add a I think we should start with the Saved Objects Management plugin's search abilities as a baseline. It allows plugins to specify a kibana/src/plugins/saved_objects_management/server/routes/find.ts Lines 66 to 77 in a7508b8
I know of #42316, but other than that is this existing search functionality sufficient for searching across Saved Objects or do we need something more powerful? More generally,
To let ES search on it we will have to change the |
I agree that starting with the way that saved-objects management does search as a baseline is reasonable. It definitely leaves something to be desired, but it's tolerable. The Restricting the searches to the current namespace for the initial implementation is completely fine, we previously discussed that limitation and everyone seemed onboard. I believe that @legrego is looking into how we'd relax this restriction for another use-case. You can still do searches on |
Yep, I'm looking into this whenever I get free cycles: partially for GS, and partially for the IM/Fleet project. I have a very rough POC working, but getting it tested and production ready is another task altogether |
That seems like a good idea. Either leveraging this API directly, or construct our own based on the existing
Yea, as @kobelb already said, this is totally fine for V1.
Yea it's not great. @rudolf do you see any impact on changing the @ryankeairns functionally, can we get you opinion on:
|
I don't think it would cause any issues. It's not optimal for performance but we can use a multi field to index it as both keyword and text if that's a problem. We should probably do a benchmark with 100K objects so that we don't have do to another migration if this does end up impacting performance when Saved Objects support much more documents. |
I think we should use a multi-field for the |
In my mind, I would expect gs.find('dash') to return the Dashboard application, but returning all the dashboards 1) feels excessive for performance reasons and 2) would be so broad that it would be difficult to locate a specific dashboard. If users want to see all their dashboards, then they should just navigate to the Dashboard app as they are all listed (and searchable) on the Dashboard home page. |
SGTM functionally, and it's also a good new for the technical implementation as it means we don't need to introduce the multi-field for |
After a slack discussion with @spalger about #68550, it seems that even if we were to add the One option would be to rely on the same algorithm I used in #68488 (exact match + levenshtein distance) between the search term and the type's One alternative would be to just return the plain Do anyone see a better option? |
Even if we could normalize the score, normalizing scores so that an application name match will optimally interleave with a saved object title match is a fuzzy problem, it's ultimately a decision we need to make. Maybe if providers limit their results to a sensible amount and we had a fixed priority we could display e.g. the top 3 application results, followed by the top 10 saved objects. So we don't try to interleave results, but instead decide beforehand how much "real estate" we want to give a certain provider. |
In practice, the The problem will really arise when we'll start adding results from other Kibana instances (in v2 or v3 of the searchbar). Then we'll have different SO results from distinct ES queries with non-normalized scores, and currently no way no normalize all that... |
@pgayvallet regarding results from multiple instances, there was a suggestion for grouping results that might help us in this case. Also, we could consider having users navigate to an 'advanced search' results page that could allow for more robust filtering of results. |
@myasonik @ryankeairns After some discussion with the team, it seems there is no easy way to have consistent scoring between different providers. Functionally, that means that From what I understand, this would not really be an issue as you were planning to sort by type display application results on top anyway. Can you confirm this would be acceptable to you? I could even add a |
@pgayvallet that is correct, we would want the application results first so sorting/separating those to the top (by type) makes sense. If I'm following your last sentence, we could use the |
This issue is to discuss the concrete implementation of the SavedObject result provider needed for the GlobalSearch MVP: #58049
Related issues:
From #58049, the types of SO we would need to return would be:
Questions:
How exactly will we perform the query / which fields should we search by
It's still unclear which fields we should search by. The base
SavedObject
type do not even have atitle
field in the base implementation, and I'm not sure all types actually declare one in their mappings.Second point, when calling for example
gs.find('dash')
, should we search on the type field and return alldashboard
objects? Thetype
field being akeyword
, is this doable?Is our current
find
API sufficient, or will we need to create a new oneDirectly depends on the first point. I feel like we will need to add a new API to answer the GS needs, even if ideally this would be avoided.
Is it technically possible to retrieve all SO in a single query
For performances, it would be best if we could retrieve all types of saved objects in a single query, instead of performing x (= nb types) queries. Would this be a possibility?
The text was updated successfully, but these errors were encountered: