-
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
async es|ql search strategy #174246
async es|ql search strategy #174246
Conversation
/ci |
/ci |
/ci |
/ci |
1 similar comment
/ci |
/ci |
1 similar comment
/ci |
/ci |
/ci |
1 similar comment
/ci |
/ci |
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
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.
This works great! I tested both Discover and Lens, everything works as expected. @lukasolson a review from you would be awesome though as this is not an area I shine
src/plugins/data/server/search/strategies/esql_async_search/esql_asyn_search_strategy.test.ts
Outdated
Show resolved
Hide resolved
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 a quick code review and left few comments. Will test it locally.
src/plugins/data/server/search/strategies/esql_async_search/request_utils.ts
Outdated
Show resolved
Hide resolved
src/plugins/data/server/search/strategies/esql_async_search/request_utils.ts
Outdated
Show resolved
Hide resolved
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.
Looking good, just some minor feedback about reusing the existing utils
IKibanaSearchResponse<SqlGetAsyncResponse> | ||
> => { | ||
function cancelAsyncSearch(id: string, esClient: IScopedClusterClient) { | ||
const client = useInternalUser ? esClient.asInternalUser : esClient.asCurrentUser; |
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.
useInternalUser
shouldn't be necessary, it was only necessary for the default search strategy. (It can be removed from the non-async ESQL strategy as well, but that can be done separately if you'd like)
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'll leave it for now
src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts
Outdated
Show resolved
Hide resolved
src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts
Outdated
Show resolved
Hide resolved
src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts
Outdated
Show resolved
Hide resolved
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.
Is this file necessary or can we reuse the existing functions from src/plugins/data/server/search/strategies/ese_search/request_utils.ts? They are already being used by the EQL strategy. We should probably move them to the common/ directory.
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.
yes, its different due to different params on the esql request
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.
Same question here as above, can we reuse the existing functions
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.
yes, its different due to different params on the esql response
Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
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, just hoping for a little bit of cleanup
src/plugins/data/server/search/strategies/esql_async_search/response_utils.ts
Outdated
Show resolved
Hide resolved
src/plugins/data/server/search/strategies/esql_async_search/esql_async_search_strategy.ts
Outdated
Show resolved
Hide resolved
…sponse_utils.ts Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
/ci |
/ci |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: cc @ppisljar |
Summary
async es|ql search strategy