Product DocsMenu

Adding or Customizing a Related Results Panel With the .NET Interface Editor

The Coveo .NET Front-End comes with a number of built-in Related Results panels that you can easily add to your .NET search interface (see Managing Built-in Facets and Related Results Appearing in a .NET Search Interface).

You can also customize existing Related Results panels or create new ones and add them to a .NET search interface.

Important: The Related Results information is passed through the search interface URL. When you add a few Related Results panels to a .NET search interface, the search interface URL can easily exceed the Internet Explorer URL length limit. Use the URL shortener feature to eliminate this issue (see Deploying the .NET Search Interface URL Shortener Database).

To add or customize a Related Results panel with the .NET Interface Editor

  1. Access the Coveo .NET Front-End Interface Editor (see Opening the .NET Interface Editor).

  2. Select the Search Interfaces tab.

  3. On the menu bar:

    1. In the Current Interface drop-down list, select the search interface that you want to modify.

    2. Click the Features menu.

  4. In the navigation panel on the left, click Facets and Related Results.

  5. In the panel on the right:

    • To add a new Related Results panel, above the Built-in Facets list, click Add New Related Results.

      OR

    • To customize an existing Related Results panel, in the Facets and Related Results list, click the Related Results panel that you want to modify.

    A page similar to the one shown below appears.

  6. Under Edit Related Results, configure the following required parameters:

    1. In the Title box, type the text that you want to see as the caption at the top of the Related Results panel. Click the button to also enter the caption translated for all supported languages.

    2. In the Search Interface drop-down list, select the search interface from which you want this Related Results panel to display search results.

    3. In the Display Template drop-down list, select the desired Related Results display template from those available for the selected source search interface (see Adding Related Results Display Templates With the .NET Interface Editor).

    4. If a developer programmed a customized version of the Related Results code that you want to rather use: 

      1. In the Assembly box, enter the fully qualified assembly name containing the class specified in the Class box.

      2. In the Class box, enter the name of a class (including its namespace) to use to instantiate the Related Results instead of the default RelatedResultsFacet class. The class you specify must inherit from RelatedResultsFacet.

    5. Next to Icon, when you want to use an icon other than the default one next to the Related Results title:

      1. Click Change.

      2. Click the Choose File button that appears, and then select the icon image file in the dialog box that opens.

      3. Click Upload, to transfer the file from its original location to the Coveo server.

    6. In Zone, select where the Related Results panel appears in the search interface:

      • Interface's default related results position: As specified in the in Default Related Results Parameter for this search interface.

      • Right: Appears in the vertical zone on the right side of the search interface.

      • Top: Appears in the horizontal zone at the top of the search interface.

      • Left: Appears in the vertical zone on the left side of the search interface.

      Note: You can hierarchically set Related Results panel positions for a hub, for a search interface, and for specific Related Results panels (see Configuring the Position of Facets and Related Results Panels With the .NET Interface Editor).

    7. In Display Style, select the how the Related Results panel appear: 

      • Normal: Default format.

      • Dropdown: The Related Results panel appears as a drop-down control that is collapsed by default. This type of Related Results panel is generally hosted in the Top Zone.

    8. In the Number of Results box, enter the number of search results that appear in the panel. The default value is 3.

    9. In the Sort Criteria drop-down list, select the criterion controlling the order in which search results appear in the Related Results panel following :

      • Default: Default sort option set for the related search interface

        When you change the sort option for the search interface, the sort option also changes for the Related Results panel.

      • Relevance: Descending ranking score order

      • Modified Date Ascending: Modified date, starting with the oldest.

      • Modified Date Descending: Modified date, starting with the newest.

    10. Select the Collapse by default check box when you want the Related Results panel to initially show only its caption, not search results.

      This option is useful for example for less frequently used Related Results panels when your search interface includes many Related Results panels and you want to save vertical space.

  7. You can modify the ranking score of search results appearing in the Related Results panel using query ranking expressions (see What Are Query Ranking Expressions?):

    1. Next to Query Ranking Expressions, click Add New.

    2. In the Expression box, enter a valid query ranking expression (QRE).

    3. In the Modifier drop-down list, select the appropriate modifier value.

    Note: CES 7.0.8388+ (June 2016) Once done, ensure query expressions (QREs) are effective by reviewing the Ranking weights tab of any search result. The tab shows the weight of each QRE that impacted the ranking of a result (see Troubleshooting Ranking).

  8. Click OK to complete the custom Related Result panel creation.

  9. Back in the Facets and Related Results page, the new Related Result panel appears at the end of the Facets and Related Results list where you can:

    1. Click Up or Down to set the position of the Related Result panel relative to other Related Result panels and facets, for each zone in the search interface.

    2. When you want to eliminate a Related Result panel, select a Related Result panel and then click Delete.

  10. Using a browser, open or reload the search interface to verify that the Related Result panel behaves as you expect.

Note: You can also add a Related Results panel in a search interface by editing its skin. Facets and Related Results are typically defined in the LeftToolbar.ascx and RightToolbar.ascx files.

Example: The following code shows a Related Results control inserted in one of those files:

<ces:RelatedResultsFacet InterfaceName="People" DisplayTemplateAscxFileName="RelatedResultsDisplayTemplate.ascx" ID="rrfPeople" Title="Related People" SortBy="ModifiedDateAscending" NumberOfResults="5" FacetId="MustHaveAUniqueIdHere" runat="server" />  
People who viewed this topic also viewed