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

Add Search Task API and Refactor search actions and handlers #149

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

Zhangxunmt
Copy link
Collaborator

Signed-off-by: Xun Zhang xunzh@amazon.com

Description

Add Search Task API and Refactor search actions and handlers.
More unit tests will be added in the next PRs.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Xun Zhang <xunzh@amazon.com>
@Zhangxunmt Zhangxunmt requested a review from a team February 23, 2022 20:29
public static FetchSourceContext getSourceContext(RestRequest request) {
String userAgent = Strings.coalesceToEmpty(request.header("User-Agent"));
if (!userAgent.contains(OPENSEARCH_DASHBOARDS_USER_AGENT)) {
return new FetchSourceContext(true, Strings.EMPTY_ARRAY, UI_METADATA_EXCLUDE);
Copy link
Collaborator

Choose a reason for hiding this comment

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

ML plugin doesn't have UI, so no need to return ui_metadata.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure will do in the next PR.

Copy link
Collaborator

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

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

LGTM. You can fix the ui metedata part in next PR.

@Zhangxunmt Zhangxunmt merged commit afa4788 into opensearch-project:main Feb 23, 2022
@ylwu-amzn ylwu-amzn mentioned this pull request Mar 9, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants