Specifying relevance ranking for record and value searches

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 TextSearchFilter element lets you specify a relevance ranking strategy for the query, as in this example:
<Request xmlns="http://www.endeca.com/MDEX/conversation/3/0">
   <State>
      <TextSearchFilter Key="Flavors" Mode="AllPartial" RelevanceRankingStrategy="exact" Language="en">
        grapefruit
      </TextSearchFilter>
   </State>
   <RecordListConfig Id="RecList" MaxPages="10">
      <Column>Flavors</Column>
      <RecordsPerPage>5</RecordsPerPage>
   </RecordListConfig>
   <SearchAdjustmentConfig Id="SpellCorrect"/>
</Request>

For more information on the TextSearchFilter, see Record search filter.

Value search

For value search, the RelevanceRankingStrategy attribute of the ValueSearchConfig type allows you to specify a relevance ranking strategy for the query.
<Request>
   <State/>
   <ValueSearchConfig Id="ProdSearch" MaxPerProperty="5" 
        RelevanceRankingStrategy="static (nbins,descending)" Mode="Any" Language="en">
      <SearchTerm>racks</SearchTerm>
      <RestrictToProperties>
         <Property>ProductCategory</Property>
         <Property>BikeRacks</Property>
      </RestrictToProperties>
   </ValueSearchConfig>
</Request>

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