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

[App Search] Wired up organic results on Curation Suggestions view #114717

Merged
merged 6 commits into from
Oct 19, 2021

Conversation

JasonStoltz
Copy link
Member

@JasonStoltz JasonStoltz commented Oct 12, 2021

Summary

The organic results section of the suggestion detail view was previously hard-coded to show mock data.

This PR uses a new dashboard endpoint API endpoint to render that section.

This new API endpoint additionally replaces a series of multiple API calls that view previously needed to make in order to hydrate all necessary data.

In addition to showing organic search results, I also added an EuiEmptyPrompt when there are no organic results to show.

screencapture-localhost-5601-fyn-app-enterprise-search-app-search-engines-pokemon-curations-suggestions-a-bug-pokemon-2021-10-18-13_54_49
screencapture-localhost-5601-fyn-app-enterprise-search-app-search-engines-pokemon-curations-suggestions-blayblah-2021-10-18-13_54_09

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@JasonStoltz JasonStoltz force-pushed the organic-results-suggestions branch from 430e204 to df70b3a Compare October 12, 2021 19:58
@JasonStoltz JasonStoltz force-pushed the organic-results-suggestions branch from df70b3a to 0494263 Compare October 13, 2021 16:54
@JasonStoltz
Copy link
Member Author

@elasticmachine merge upstream

@JasonStoltz JasonStoltz changed the title Added Organic Results [App Search] Wired up organic results on Curation Suggestions view Oct 18, 2021
@JasonStoltz JasonStoltz marked this pull request as ready for review October 18, 2021 18:11
@JasonStoltz JasonStoltz requested a review from a team October 18, 2021 18:11
@byronhulcher byronhulcher added auto-backport Deprecated - use backport:version if exact versions are needed Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.16.0 labels Oct 18, 2021
Copy link
Contributor

@byronhulcher byronhulcher left a comment

Choose a reason for hiding this comment

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

lgtm!

operation: 'create' | 'update' | 'delete';
override_curation_id?: string;
}

// A curation suggestion with linked ids hydrated with actual values
export interface HydratedCurationSuggestion
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice use of typescript here!

values.engine.schema
);
});

it('shows an empty prompt when there are no organic results', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -116,9 +116,9 @@ describe('search relevance insights routes', () => {
});
});

describe('POST /internal/app_search/engines/{name}/search_relevance_suggestions/{query}', () => {
describe('GET /internal/app_search/engines/{engineName}/search_relevance_suggestions/{query}', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes me think whether we should differentiating between internal and public API paths more plainly. Otherwise I have to dig into the routes file to know whether its hitting /as/ or /api/as/ and I think we do have duplicate paths.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a great point.

@JasonStoltz JasonStoltz enabled auto-merge (squash) October 18, 2021 18:54
@JasonStoltz
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1552 1551 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 1.4MB 1.4MB -10.3KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @byronhulcher

@JasonStoltz JasonStoltz merged commit b7577b5 into elastic:master Oct 19, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 114717

jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 19, 2021
…-link-to-kibana-app

* 'master' of github.com:elastic/kibana: (30 commits)
  Fix potential error from undefined (elastic#115562)
  [App Search, Crawler] Fix validation step panel padding/whitespace (elastic#115542)
  [Cases][Connectors] ServiceNow ITOM: MVP (elastic#114125)
  Change default session idle timeout to 8 hours. (elastic#115565)
  Upgrade EUI to v39.1.1 (elastic#114732)
  [App Search] Wired up organic results on Curation Suggestions view (elastic#114717)
  [i18n] remove i18n html extractor (elastic#115004)
  [Logs/Metrics UI] Add deprecated field configuration to Deprecations API (elastic#115103)
  [Transform] Add alerting rules management to Transform UI (elastic#115363)
  Update UI links to Fleet and Agent docs (elastic#115295)
  [ML] Adding ability to change data view in advanced job wizard (elastic#115191)
  Change deleteByNamespace to include legacy URL aliases (elastic#115459)
  [Unified Integrations] Remove and cleanup add data views (elastic#115424)
  [Discover] Show ignored field values (elastic#115040)
  [ML] Stop reading the ml.max_open_jobs node attribute (elastic#115524)
  [Discover] Improve doc viewer code in Discover (elastic#114759)
  [Security Solutions] Adds security detection rule actions as importable and exportable (elastic#115243)
  [Security Solution] [Platform] Migrate legacy actions whenever user interacts with the rule (elastic#115101)
  [Fleet] Add telemetry for integration cards (elastic#115413)
  🐛 Fix single percentile case when ES is returning no buckets (elastic#115214)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
byronhulcher pushed a commit that referenced this pull request Oct 19, 2021
…4549) (#115650)

* Handle deletes (#114545)

* [App Search] Wired up organic results on Curation Suggestions view (#114717)

* [App Search] Added a History tab to the Automated Curation detail view (#115090)

* Check platinum license (#114549)
@byronhulcher
Copy link
Contributor

Backported in #115650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants