-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Unify search plugin step 1 #95811
Conversation
# Conflicts: # src/plugins/data/server/search/search_service.ts
# Conflicts: # docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchbar.md # src/plugins/data/README.mdx # src/plugins/data/server/search/search_service.ts # x-pack/plugins/data_enhanced/config.ts # x-pack/plugins/data_enhanced/server/plugin.ts # x-pack/plugins/data_enhanced/server/search/session/check_running_sessions.ts
# Conflicts: # src/plugins/data/common/search/types.ts # src/plugins/data/server/server.api.md
# Conflicts: # x-pack/plugins/data_enhanced/config.ts # x-pack/plugins/data_enhanced/server/search/session/check_running_sessions.test.ts # x-pack/plugins/data_enhanced/server/search/session/check_running_sessions.ts
This reverts commit 1ea7325.
@@ -30,3 +30,62 @@ export const configSchema = schema.object({ | |||
}); | |||
|
|||
export type ConfigSchema = TypeOf<typeof configSchema>; | |||
|
|||
export const searchSessionsConfigSchema = schema.object({ |
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.
Had to move the schema now to src/
because ese
strategy uses defaultExpiration
from it.
This schema is still registered by x-pack/
code
@@ -183,6 +184,11 @@ export class SearchInterceptor { | |||
request: IKibanaSearchRequest, | |||
options: ISearchOptions = {} | |||
): Observable<IKibanaSearchResponse> { | |||
options = { | |||
strategy: ES_SEARCH_STRATEGY, |
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.
search_interceptor will be simplified in follow-up pr. for now I had to specify non async search strategy here, otherwise it would hit async and won't handle partial results.
@@ -31,6 +32,7 @@ export interface IScopedSearchSessionsClient<T = unknown> { | |||
cancel: (sessionId: string) => Promise<{}>; | |||
delete: (sessionId: string) => Promise<{}>; | |||
extend: (sessionId: string, expires: Date) => Promise<SavedObjectsUpdateResponse<T>>; | |||
getConfig: () => SearchSessionsConfigSchema | null; |
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.
SearchSession still leave in x-pack, but ese strategy needs defaultExpiration
from its config
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.
Reviewed as draft, without testing.
Looks like a good first step
# Conflicts: # src/plugins/data/common/search/types.ts # x-pack/plugins/data_enhanced/public/search/search_interceptor.ts
Pinging @elastic/kibana-app-services (Team:AppServices) |
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.
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.
Security solution are approved, I make sure to test it locally ;)
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.
Asset management 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.
Left a couple of minor nits, but code LGTM, and tested locally and things seem to be working great!
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsAPI count
API count missing comments
History
To update your PR or re-run it, just comment with: |
Remove the defaultStrategy override Move async search strategy to data Move EQL search strategy to data Move rest of common/search/session data (Moving whole search/session is blocked by security and taskManager)
Summary
Partially addresses #92802
In this pr:
defaultStrategy
overridedata
data
common/search/session
data
(Moving wholesearch/session
is blocked bysecurity
andtaskManager
)Still
TODO
In separate pr:search/session
to data (blocked bysecurity
andtaskManager
)Checklist
For maintainers