Product DocsMenu

Customizing the Ranking for a .NET Search Interface

The Coveo Platform uses sophisticated search results ranking algorithms to return the most relevant documents for each query (see Understanding Search Results Ranking). There are several ways that you can use to optimize the ranking of your search results (see Best Practices for Ranking Optimization).

Coveo .NET Front-End 12.0.360+ (September 2013) One way to adjust the ranking is for a given Coveo .NET Front-End search interface. From the .NET Interface Editor, you can assign one or more query ranking expressions (QRE) to a .NET search interface to promote or demote the ranking of documents matching a given query (see What Are Query Ranking Expressions?).

To customize the ranking for a .NET search interface

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

  2. Click the Search interfaces tab.

  3. On the menu bar:

    1. In the Current Interface drop-down list, select the search interface for which you want to adjust search results ranking.

    2. Select Features.

  4. In the navigation panel on the left, select Ranking.

  5. In the panel on the right:

    1. Click Add New.

    2. In the Expression box, enter the valid query expression that returns the documents for which you want to modify the ranking score.

      Note: The expression is not validated by the front-end. If it is invalid, it will be ignored by the index and the message will be generated. It is therefore recommended that you test your expression. You can simply enter it in the search box of the interface, verify that it is valid and that it returns the expected documents.

    3. In the Modifier drop-down list, select a preset modifier value, or select Custom, and then enter the desired value that must be between -100 and +100 (see What Is the Impact of Modifier Values on the Final Ranking Score?).

      Note: By default, the modifier values are limited to be between -100 and +100 to ensure that your QRE does not completely override the normal ranking algorithm. You can however disable this restriction by setting the limitQueryRankingExpressionsModifierRange option to false in the [.Net_Front-End_Path]\Web\Web.config file.

      <coveoEnterpriseSearch>
        <database ... />
        <analytics ... />
        <server ... />
        <options ... limitQueryRankingExpressionsModifierRange="false" ... />
      </coveoEnterpriseSearch>  

      By default, the options tag is not present in the coveoEnterpriseSearch section of the Web.config file. You must also ensure that the following element is present in the <sectionGroup name= "coveoEnterpriseSearch"> section: 

      <section name="options" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />  

      You will then be able to enter values ranging from -2,147,483,648 to +2,147,483,647.

    4. Click Apply.

  6. Repeat the previous step to add another QRE to this interface.

  7. In the search interface, perform queries to validate that the QRE addition produces the desired search results ranking adjustments.

People who viewed this topic also viewed