Skip to content

Conversation

@lukeelmers
Copy link
Member

Part of #65069

Summary

This PR cleans up a few remaining items so that SearchSource can be moved into common and shared between client & server:

  • Removes usage of handleResponse and replaces with a new onResponse callback that's provided to SearchSource
    • handleResponse is used in the client to display errors in the UI; on the server it will just pass along the response unchanged
  • Removes usage of core.http which has different client & server APIs, and replaces with callMsearch
    • callMsearch is a simple helper for calling the /internal/_msearch endpoint, and abstracts away the usage of the http service
    • On the server we will provide a different implementation of this same function
    • This is only used in the legacy default search strategy
  • Renames the config in FetchHandlers to getConfig for consistency with other areas of the data plugin
  • Extends the SearchSourceDependencies from FetchHandlers to remove duplicated types
  • Groups callMsearch and loadingCount$ under legacy in FetchHandlers, to make it clear what configuration can be removed from SearchSource whenever the legacy default search strategy is removed.

Testing

This is a refactoring; no functional changes were introduced. Most of the updates here affect the behavior of Discover / Visualizations / Dashboards when the courier:batchSearches advanced setting is enabled.

@lukeelmers lukeelmers added Feature:Search Querying infrastructure in Kibana v8.0.0 Team:AppArch release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Sep 15, 2020
@lukeelmers lukeelmers requested a review from a team as a code owner September 15, 2020 03:18
@lukeelmers lukeelmers self-assigned this Sep 15, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lukeelmers lukeelmers changed the title Unify FetchHandler types & add onResponse/callMsearch. [data.search.SearchSource] Unify FetchHandler types & add onResponse/callMsearch. Sep 15, 2020
Copy link
Contributor

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
data 543 +1 542

page load bundle size

id value diff baseline
data 1.4MB +1.2KB 1.4MB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants