Product DocsMenu

What Are Query Ranking Expressions?

A query ranking expression (QRE) modifies the ranking score of search results matching a query expression. QREs are implemented by administrators or developers for a given search interface when they want to adjust how search results are ranked.

A QRE consists of:

  • Any valid query expression

    One or many terms and one or many operators supported by Coveo Enterprise Search (CES), including date queries, Boolean queries, field queries, etc.

  • A ranking modifier

    A value that either boosts or decreases the ranking score of documents that match the query expression.

    Note: The QRE modifier value is correlated to the final search results ranking score by a 1 to 10 ratio.

Example: A QRE is made of the @author=="Barack Obama" query expression and the +10 modifier value. In search results, all documents for which Barack Obama is the author will have 100 added to their normal ranking score. The ranking score of returned documents with other authors is not affected.

You can implement one or more QREs in a given context. There are no hard limits to the number of QREs that can be evaluated, although implementing several may have an impact on search interface performances.

QRE Usage Example

In a search interface that has a large scope, QREs can boost search results matching your relevance criteria, but still return results from the whole scope, as opposed to reducing the scope of the search interface to show only the more relevant content.

Example: The search interface of an Engineering department Intranet site has a scope that includes the Intranet content (source named Intranet_Eng ), but also other Engineering documents repositories. This large scope is useful as engineers can search all Engineering content from one place. However, because they search from the Intranet, they are likely to be looking primarily for content from the Intranet.

If you want to favor search results from the Intranet in this search interface, you can define a QRE with the query expression @source="Intranet_Eng" and a modifier of +50 to boost the ranking of Intranet search results and provide better contextual search results.

What Is the Impact of Modifier Values on the Final Ranking Score?

QREs should use a modifier between -100 and +100 to alter ranking without completely overriding it. A match for a document and QRE using a modifier of 100 gives approximately the same score bonus as a non-frequent term matching a title.

How to Implement QREs?

People who viewed this topic also viewed