Example of breadcrumbs with DYM

Breadcrumbs information returned by the Conversation Web Service can reflect DYM suggestions. The following example illustrates this case.

To request breadcrumbs in a search query that returns DYM suggestions, specify the keyword search entry, and the BreadcrumbConfig and SearchAdjustmentConfig types of the ContentElementConfig complex type.

The following example of a request contains a keyword search jane:
<Request xmlns="http://www.endeca.com/MDEX/conversation/1/0">
  <State /> 
  <Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:type="SearchOperator" Within="false">
   <SearchFilter Mode="All" Key="Essay">
    jane
   </SearchFilter> 
  </Operator>
  <ContentElementConfig
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:type="BreadcrumbConfig" ReturnFullPath="true" 
    HandlerFunction="BreadcrumbHandler" 
    HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
    Id="Breadcrumbs" />
  <ContentElementConfig 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:type="SearchAdjustmentConfig" 
    HandlerFunction="SearchAdjustmentHandler" 
    HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
    Id="SearchAdjustments" />   
</Request>

The response reflects DYM results. In this example, the response includes the request with operators applied, followed by a DYM suggested term, can and by the ApplySpellingSuggestionOperator that actually replaces the keyword with the term suggested with DYM.

The first half of the response repeats the request:
<cs:Results 
  xmlns:cs="http://www.endeca.com/MDEX/conversation/1/0" 
  xmlns:mdex="http://www.endeca.com/MDEX/XQuery/2009/09">
 <cs:Request>
   <cs:State>
    <SearchFilter xmlns="http://www.endeca.com/MDEX/conversation/1/0" 
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      Mode="All" Key="Essay">
      jane
    </SearchFilter>  
   </cs:State>
  <ContentElementConfig 
    xmlns="http://www.endeca.com/MDEX/conversation/1/0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:type="BreadcrumbConfig" ReturnFullPath="true" 
    HandlerFunction="BreadcrumbHandler" 
    HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
    Id="Breadcrumbs" /> 
  <ContentElementConfig 
    xmlns="http://www.endeca.com/MDEX/conversation/1/0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:type="SearchAdjustmentConfig" 
    HandlerFunction="SearchAdjustmentHandler" 
    HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
    Id="SearchAdjustments" /> 
 </cs:Request>
The second half of the response includes the information for DYM:
<cs:ContentElement 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:type="cs:Breadcrumbs" Id="Breadcrumbs">
  <cs:SearchBreadcrumb DisplayName="Essay">
     <cs:SearchFilter Key="Essay" Mode="All">
         jane
     </cs:SearchFilter> 
     <cs:Operator xsi:type="cs:PopSearchOperator">
       <cs:SearchFilter Key="Essay" Mode="All">
         jane
       </cs:SearchFilter> 
     </cs:Operator>
   </cs:SearchBreadcrumb>
  </cs:ContentElement>
  <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>
</cs:Results>