Specifying relevance ranking for record search and value search in query requests

You can specify a relevance ranking strategy for both record search queries and value search queries in the Conversation Web Service.

Both types of queries let you specify either an existing relevance ranking strategy or the names of the relevance ranking modules.

Record search

For record search, the RelevanceRankingStrategy attribute of the SearchFilter element lets you specify a relevance ranking strategy for the query, as in this example:
<ns:Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:ns="http://www.endeca.com/MDEX/conversation/1/0" xsi:type="ns:SearchOperator" 
Within="false">
<ns:SearchFilter Mode="AllPartial" RelevanceRankingStrategy="exact" 
      Key="Description">Mountain</ns:SearchFilter>
</ns:Operator>

For more information on the SearchFilter, see Record search operator.

Value search

For value search, the RelevanceRankingStrategy attribute of the ValueSearchConfig type lets you specify a relevance ranking strategy for the query.
<ns:ContentElementConfig 
Id="ValueSearchConfig" 
xsi:type="ns:ValueSearchConfig" 
HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
HandlerFunction="ValueSearchHandler" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
MaxPerProperty="5" 
RelevanceRankingStrategy="static (nbins,descending)" 
Mode="Any">
		<ns:SearchTerm>"Bike Racks"</ns:SearchTerm>
		<ns:RestrictToProperties>
				<ns:Property>ProductCategory</ns:Property>
		</ns:RestrictToProperties>
</ns:ContentElementConfig>

For more information on the ValueSearchConfig type, see Value search query format.