- Coveo for Sitecore Hive Framework
- Setting up the Interface
- Retrieving Results
- Improving the Experience
- Styling the Experience
- Query Performance Best Practices
Styling the Search Experience
Improving the search experience can be accomplished by modifying information that a search interface returns and enhancing the way that information is presented.
Your initial functional search interface might well make use of the
default.cshtml result template view file. This view file renders generic field data that, most likely, is of little value to your users. Additionally, until you perform the necessary steps, all your search results display these generic fields, regardless of the type of Sitecore item the result relates to.
To make your search result details more relevant, you should now create your own result template view files and reference them in Coveo result template components. To achieve this goal, you need to know how to embed Coveo result template components in Coveo results list components and ensure the appropriate result template is rendered, based on conditions you want to specify (see Creating and Making Use of a New Result Template).
Next, you want to choose the fields that are displayed in the result templates, show some fields under some conditions, and automatically display field labels in the user native language (see Editing the Content of a Result Template).
Coveo allows you to add tabs to your search interface. Tabs are often used to add a specific filter expression, effectively zeroing in on a subset of your indexed documents. In this scenario, it may make sense to display a certain facet or result template when the user is on one tab, but not when on another. Coveo for Sitecore components support this use case (see Managing Components on a Per-Tab Basis).
You might also find your initial search interface bland, or not in line with your corporate branding. Thus, you probably want to override the default Coveo for Sitecore CSS with your own (see Inserting Custom CSS in Coveo for Sitecore).
Finally, if a critical error occurs when rendering your search interface, the Coveo Search Interface component displays a generic message. You might want to replace this generic message with one that instructs your users on how to report the issue (see Overriding the Search Friendly Error Message).