Skip to content
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

[Search] Expose same API on client/server #55583

Closed
lukasolson opened this issue Jan 22, 2020 · 2 comments
Closed

[Search] Expose same API on client/server #55583

lukasolson opened this issue Jan 22, 2020 · 2 comments
Assignees
Labels
Feature:Search Querying infrastructure in Kibana loe:medium Medium Level of Effort v7.9.0

Comments

@lukasolson
Copy link
Member

Currently, the search service exposes a similar API on the client (via registerMountContext) and on the server (via registerRouteHandlerContext).

However, the service registered on each of these varies in an important way, which is that the logic and parameters that are added to the request by the client-side search strategies (when calling search client-side via mount context) will not be added when calling search server-side via route context.

Specifically, the following client-side logic which sets preference will not properly be added when using the server-side APIs:

if (typeof request.params.preference === 'undefined') {
const setPreference = context.core.uiSettings.get('courier:setRequestPreference');
const customPreference = context.core.uiSettings.get('courier:customRequestPreference');
request.params.preference = getEsPreference(setPreference, customPreference);
}

We need to move this logic into the server-side search strategy so that the APIs exposed in both places will function equivalently.

This is prerequisite to allow expressions to run server side (#46906) since esaggs will rely on the search service.

@lukasolson lukasolson added Feature:Search Querying infrastructure in Kibana Team:AppArch labels Jan 22, 2020
@elasticmachine
Copy link
Contributor

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

@lukasolson lukasolson self-assigned this Feb 24, 2020
@lukasolson lukasolson added the loe:medium Medium Level of Effort label Mar 31, 2020
@lizozom lizozom added the v7.8 label Apr 2, 2020
@rayafratkina rayafratkina added v7.8.0 and removed v7.8 labels Apr 6, 2020
@lizozom lizozom changed the title [Search service] Expose same API on client/server [Search] Expose same API on client/server Jun 3, 2020
@spalger spalger added v7.8.1 and removed v7.8.0 labels Jun 18, 2020
@alexh97 alexh97 added v7.9.0 and removed v7.8.1 labels Jun 26, 2020
@lukasolson
Copy link
Member Author

Closed by #70446.

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 loe:medium Medium Level of Effort v7.9.0
Projects
None yet
Development

No branches or pull requests

6 participants