How to Configure Kendra 'Answer' results to be displayed as TopAnswers results
Amazon Kendra returns an 'answer' when it detects one or more question answers in the response.
In order to display these as SmartHub TopAnswers results (see the picture below) follow these steps:
- Navigate to your Results.html page and open it.
- Find the Center column section (around line 98).
- Add the following code snippet as a child of the CoveoResultList div element (around line 118).
Copy
<script type='text/underscore' class='result-template' data-condition="isTopAnswer == true">
<div class="coveo-result-frame core-result">
<div class="core-result-info-wrapper">
<div class="core-info widgets-placeholder">
<div class="sh-top-answer">
<div class="sh-top-answer-title"> Smart Answer </div>
<div class="sh-top-answer-summary"><%= raw.excerpt %></div>
</div>
</div>
</div>
</div>
</script>
