Tech Blog Menu

< Back

Customize Ranking with QRE

By Karel Mpungi —

A query ranking expression (QRE) modifies the ranking score of search results matching a query expression.

What is the impact on the final ranking score?

The QRE feature is computed during the first phase of the ranking algorithm. This will have an impact on all documents, especially in case where it’s only the QRE that boost the document’s weight.

Since the September 2013 build, a QRE interface was added to the Interface Editor. The QRE interface can be found under Interface Editor - Search Interfaces – Features - Ranking.

The QRE Interface

With this interface, QRE can be modified directly from the Interface Editor without using CES. All QRE created within the Interface Editor are specific to the search interface that is selected in “current Interface” dropdown menu. Therefore, the QRE will affect every queries made in that search interface.

Example

A query is made for “pdf”, as you can see the first result is not a pdf file. We can boost PDF type document weight by using QRE.

Total Ranking Weight

A QRE is made for @sysfiletype==”pdf” query expression and the +100 modifier value. In the search results, all documents for which PDF is the file type will have 1000 added to their normal ranking score. The ranking score of returned documents with other file types is not affected.

Adding a QRE

QRE Modifier

The impact on the final score is:

  • (+100) will increase your document QRE weight by 1000
  • (+50) will increase your document QRE weight by 500
  • (-50) will decrease your document QRE weight by 500
  • (-100) will decrease your document QRE weight by 1000

You can also select “custom” in order to enter a custom value.

Now if we perform the same query, some PDF type documents will be listed first.

QRE Value

Why is there a QRE by default for some documents and not for the others?

Document with a QRE Value

Document wihtout a QRE Value

You need to compare the language of your search interface versus the @syslanguage of the document in CES Admin tool – Content – Index Browser

Document Language

  • If the language of the document matches the language of the search interface, the QRE of the document will automatically be: 600.
  • If the language of the document doesn’t match the language of the search interface or @syslanguage is missing under the Field tab, then the QRE of the document will automatically be: 0

How to Implement QREs?

Written by Karel Mpungi
Product Expert, Advanced Enterprise Search Platform