-
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
[data.search.searchSource] Add fetch$ observable for partial results #89211
Conversation
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.
Looks perfect, I'd update the tests to verify behavior with partial results
Pinging @elastic/kibana-app-services (Team:AppServices) |
}) | ||
); | ||
} | ||
|
||
/** | ||
* Fetch this source and reject the returned Promise on error | ||
* |
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.
Should we maybe add @deprecated to this?
@@ -305,16 +308,16 @@ export class SearchSource { | |||
* Run a search using the search service |
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.
I think this block can be deleted from a private fn?
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.
Added a couple of documentation comments.
Overall LGTM
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.
code LGTM
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
…lastic#89211) * [data.search.searchSource] Add fetch$ observable for partial results * Fix mocks & add tests * Update docs * Update docs * Review feedback
Summary
Resolves #82887.
Adds a
fetch$
method inSearchSource
that enables consumers to get partial results instead of only the final response.Checklist
For maintainers
Plugin API Changes
The
data
pluginsearch
serviceSearchSource
now provides afetch$
method in addition to the existingfetch
method that returns anObservable
over all responses returned. This is useful when_async_search
is being used and the consumer needs to handle partial search responses.