Common Use Cases
- Providing Search Box Suggestions
- Creating a Standalone Search Box
- Folding Results
- Changing the Language of Your Search Interface
- Adding ARIA Landmarks
- Sending Custom Context Information
- Using Dynamic Facets
- Using Hierarchical Facets
- Normalizing Facet Value Captions
- Requesting Specific Facet Range Values
- Defining Dependent Facets
- Changing the Behavior When a Result Link is Clicked
- Validating an Interface Is Machine Learning Ready
- Adding Promoted Results Badges
Adding Promoted Results Badges
Featured results, which are configured through query pipeline rules (see Adding and Managing Query Pipeline Featured Results).
You can add this component anywhere in your search interface. The component will then add a badge to your results after they have been rendered.
You can specify both the caption and color of the badge.
Configuring a promoted results badge for featured results1 and ART-boosted items.
<div id="search" class="CoveoSearchInterface"> <!-- ... --> <div class="CoveoPromotedResultsBadge" data-show-badge-for-featured-results="true" data-caption-for-featured="Featured" data-color-for-featured-results="orange" data-show-badge-for-recommended-results="true" data-caption-for-recommended="Recommended by Coveo ML" data-color-for-recommended-results="green"></div> <!-- ... --> </div>
The following figure shows how the badge is rendered in the search interface:
showBadgeForFeaturedResults option is
true by default, so the
data-show-badge-for-featured-results="true" property in the example above is redundant.
If you do not want the
CoveoPromotedResultsBadge component to display a badge for featured results, you must explicitly set the option to