[App Search] Wired up existing promoted documents on suggestion view#113967
Merged
JasonStoltz merged 6 commits intoelastic:masterfrom Oct 6, 2021
Merged
[App Search] Wired up existing promoted documents on suggestion view#113967JasonStoltz merged 6 commits intoelastic:masterfrom
JasonStoltz merged 6 commits intoelastic:masterfrom
Conversation
byronhulcher
approved these changes
Oct 5, 2021
Contributor
byronhulcher
left a comment
There was a problem hiding this comment.
Approving, left some minor comments
| {results.length > 0 ? ( | ||
| results.map((result) => ( | ||
| <EuiFlexItem grow={false} key={result.id.raw}> | ||
| <EuiFlexItem key={result.id.raw} style={{ width: '100%' }}> |
Contributor
There was a problem hiding this comment.
I'd rather this was in a SCSS file but 🤷
| }), | ||
| } | ||
| ); | ||
| const [documentDetails, curation] = await Promise.all(promises); |
Comment on lines
+147
to
+165
| const getDocumentDetails = async (http: HttpSetup, engineName: string, documentIds: string[]) => { | ||
| return http.post(`/internal/app_search/engines/${engineName}/search`, { | ||
| query: { query: '' }, | ||
| body: JSON.stringify({ | ||
| page: { | ||
| size: 100, | ||
| }, | ||
| filters: { | ||
| id: documentIds, | ||
| }, | ||
| }), | ||
| }); | ||
| }; | ||
|
|
||
| const getCuration = async (http: HttpSetup, engineName: string, curationId: string) => { | ||
| return http.get(`/internal/app_search/engines/${engineName}/curations/${curationId}`, { | ||
| query: { skip_record_analytics: 'true' }, | ||
| }); | ||
| }; |
Member
Author
There was a problem hiding this comment.
Nah, there's no logic to them, I just pulled them out for readability.
Contributor
|
@elasticmachine merge upstream |
Contributor
|
@elasticmachine merge upstream |
Contributor
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Contributor
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR wires up the existing promoted documents section of the suggestion details view.
If a suggestion has an existing curation associated with it, you will see the following page:

If not, you will see:

Checklist
Delete any items that are not applicable to this PR.
For maintainers