[GS] add the provider field to GlobalSearchResult#68878
[GS] add the provider field to GlobalSearchResult#68878pgayvallet wants to merge 2 commits intoelastic:masterfrom
provider field to GlobalSearchResult#68878Conversation
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
|
Pinging @elastic/kibana-platform (Team:Platform) |
joshdover
left a comment
There was a problem hiding this comment.
This does make the the Global Search API a slightly leaky abstraction...consumers now will need to have up-front knowledge of the registered providers in order to display them in the preferred order.
This is probably the most practical option though. The only other option I see is having providers register an order parameter that is used to rank results, similar to how applications specify their order in the Chrome nav. However, I think that just makes consuming this API less flexible.
I agree, we are leaking something that maybe should remain an implementation detail of the API. Also, specifically for the I was more doing this as preliminary work for the next step, when we'll have multiple providers returning the same kind of results (I'm thinking SO results from other spaces for instance) Maybe the I'm going to close it for now, as it should not be needed in the short term. We'll see if we'll need to reopen it later. |
Summary
Related to #68619
Add a
providerfield to the result type to allow consumers to access this information. Main use case would be for sorting results by provider.Checklist