対話WebサービスのTextSearchFilterタイプを使用して、問合せベースで特定の属性のスニペットを有効化できます。
対話Webサービスを使用してスニペットをリクエストするには、指定した検索インタフェースまたはテキスト検索が有効な属性で、TextSearchFilterタイプを使用します。検索インタフェースを指定した場合は、RECSEARCH_CONFIG XMLドキュメントでそのメンバーに対してスニペットが有効化されます。対話Webサービスは、RecordListEntry要素の一部としてスニペットを返します(レコード自体も返します)。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Request xmlns="http://www.endeca.com/MDEX/conversation/3/0"> <State> <TextSearchFilter Key="Description" Mode="AllPartial" EnableSnippeting="true" SnippetLength="4" Language="en"> gearing </TextSearchFilter> </State> <RecordListConfig Id="RecordList" MaxPages="30"> <Column>Description</Column> <RecordsPerPage>5</RecordsPerPage> </RecordListConfig> </Request> </soap:Body> </soap:Envelope>
<cs:ContentElement xsi:type="cs:RecordList" Id="RecordList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <cs:NumRecords>61157</cs:NumRecords> <cs:TotalPages>1224</cs:TotalPages> <cs:RecordRange First="751" Last="800"/> ... <cs:RecordListEntry> <cs:Record> <Description type="mdex:string">A true multi-sport bike that offers streamlined riding and a revolutionary design. Aerodynamic design lets you ride with the pros, and the gearing will conquer hilly roads. </Description> <FactSales_RecordSpec type="mdex:string">SO44563-19</FactSales_RecordSpec> </cs:Record> <cs:ComputedProperties> <cs:SearchSnippets Key="Description"> <cs:SearchSnippet> <cs:SnippetText>...and the gearing will conquer hilly </cs:SnippetText> <cs:SnippetTerm>gearing<cs:SnippetTerm> <cs:SnippetText> the gearing will conquer...</cs:SnippetText> </cs:SearchSnippet> </cs:SearchSnippets> </cs:ComputedProperties> </cs:RecordListEntry>