Retrieving spelling suggestions and DYM in query results

You can retrieve spelling suggestion and did you mean (DYM) information in a query using the SearchAdjustmentConfig type of the ContentElementConfig complex type of your Conversation Web Service request.

If spelling is enabled in the Oracle Endeca Server, and, in addition to breadcrumbs, you would like that the Conversation Web Service response contains supplemental information about spelling suggestions and DYM, a second SearchAdjustmentConfig type in ContentElementConfig is required. If it is included, spelling correction or DYM suggestions are returned as part of the response.

It is important to realize that if spelling is enabled, spelling auto-correction occurs even if the additional ContentElementConfig with SearchAdjustmentConfig type is not included; however, while spelling correction takes place, the spelling correction and DYM suggestions are not returned in the response.

For example, the following abbreviated section of a query request contains ContentElementConfig with SearchAdjustmentConfig type, to ensure that spelling correction and DYM suggestions are returned in the response:
<ns:ContentElementConfig
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:type="ns:SearchAdjustmentConfig" 
    HandlerFunction="SearchAdjustmentHandler"
    HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0"
    Id="SearchAdjustments"/>
The response would then be similar to the following. It contains suggested terms for DYM:
<cs:ContentElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:type="cs:SearchAdjustments" Id="SearchAdjustments">
  <cs:SuggestedAdjustment RecordCountIfApplied="15">
    <cs:SearchFilter Key="Essay" Mode="All">jane</cs:SearchFilter> 
    <cs:SuggestedTerms>can</cs:SuggestedTerms> 
    <cs:Operator xsi:type="cs:ApplySpellingSuggestionOperator">
      <cs:SearchFilter Key="Essay" Mode="All">jane</cs:SearchFilter> 
      <cs:Replacement>can</cs:Replacement> 
    </cs:Operator>
  </cs:SuggestedAdjustment>
</cs:ContentElement>