Configuring relevance ranking

This topic explains how to build a graph to configure relevance ranking.

Relevance ranking controls the order of results returned in response to a record search. A relevance ranking strategy is defined in a RELRANK_STRATEGY element, which contains elements specifying the individual relevance ranking modules. The following modules are available:

Use an XML-based configuration graph to configure relevance ranking. See XML-based configuration graphs.

Input document

The default relrank_strategies document does not define any relevance ranking strategies:
<RELRANK_STRATEGIES/>
The following example file creates a relevance ranking strategy named "ProductRelRank", which consists of the Interpreted (RELRANK_INTERP) and Field (RELRANK_FIELD) relevance ranking modules:
<RELRANK_STRATEGIES>
  <RELRANK_STRATEGY NAME="ProductRelRank">
    <RELRANK_INTERP/>
    <RELRANK_FIELD/>
  </RELRANK_STRATEGY>
</RELRANK_STRATEGIES>

Web services request

Use the putConfigDocuments operation of the Configuration Web Service to load the relevance ranking configuration document. The code entered in the Web Services Client resembles the following example:
<config-service:configTransaction 
  xmlns:config-service="http://www.endeca.com/MDEX/config/services/types/1/0">
<config-service:OuterTransactionId>${OUTER_TRANSACTION_ID}</config-service:OuterTransactionId>
<config-service:putConfigDocuments  
  xmlns:mdex="http://www.endeca.com/MDEX/XQuery/2009/09">
<mdex:configDocument name="relrank_strategies">
<RELRANK_STRATEGIES>
  $xmlString
</RELRANK_STRATEGIES>
</mdex:configDocument>
</config-service:putConfigDocuments>
</config-service:configTransaction>
The value of the name attribute (relrank_strategies) of the configDocument element directs the service to update the relrank_strategies document in the server with the value of the $xmlString variable in the RELRANK_STRATEGIES node.