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] Implement a background search service #61743

Closed
3 tasks
lizozom opened this issue Mar 29, 2020 · 2 comments
Closed
3 tasks

[Search] Implement a background search service #61743

lizozom opened this issue Mar 29, 2020 · 2 comments
Assignees
Labels
Feature:Search Querying infrastructure in Kibana v8.0.0

Comments

@lizozom
Copy link
Contributor

lizozom commented Mar 29, 2020

Part of #61738

The background search service is responsible for

  • Tracking in memory mappings of sessionId to multiple searchIds (also tracking the user and request that generated that search.
  • Clearing out those mappings if they are stale.
  • Monitoring the existence of a saved object for that sessionId (indicating a background search was requested) and storing the search IDs into it.
  • Restore an searchId for a given sessionId from a saved object.

Tasks:

  • Define a saved object to represent a background search
  • Define a BackgroundSearch service
        interface BackgroundSearchService {
            /* Track a `searchId` in memory or on a background search saved object (if exists). */
            async trackId: (userId: string, sessionId: string, requestParams: any, searchId: string) => void;
            /* Get a `searchId` from a background search saved object */
            async getId(userId: string, sessionId: string, requestParams: any): string | undefined;
            /* Create a background search saved object for a given session. */
            async store(sessionId: string) => void;
        }
  • Define a route internal\search\bg (??) where client can send a sessionId and optionally a list of searchIds. Invoke backgroundSearch.store(sessionId) and trackId for each searchId.
@lukasolson lukasolson added Feature:Search Querying infrastructure in Kibana Team:AppArch labels Mar 30, 2020
@elasticmachine
Copy link
Contributor

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

@rayafratkina rayafratkina added v7.8.0 and removed v7.8 labels Apr 6, 2020
@lizozom lizozom changed the title Implement a background search service [SEARCH] Implement a background search service Jun 3, 2020
@lizozom lizozom changed the title [SEARCH] Implement a background search service [Search] Implement a background search service Jun 3, 2020
@spalger spalger added v7.8.1 and removed v7.8.0 labels Jun 18, 2020
@mattkime mattkime removed the v7.8.1 label Jul 16, 2020
@lizozom
Copy link
Contributor Author

lizozom commented Dec 9, 2020

#84225
#84837
#84975
#85350

@lizozom lizozom closed this as completed Dec 9, 2020
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 v8.0.0
Projects
None yet
Development

No branches or pull requests

6 participants