使用可能な属性のリストの取得

絞込みの属性を構成する場合、利用可能な属性のリストを最初に取得すると役立ちます。これは、対話WebサービスのPropertyListConfigリクエスト、または構成WebサービスのlistPropertiesリクエストとRecordKindリクエストを利用して行うことができます。

次のsoapUIのサンプル・リクエストは、対話WebサービスでPropertyListConfigにより属性のリストを取得する方法を示しています。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <Request xmlns="http://www.endeca.com/MDEX/conversation/3/0">
         <State/>
         <PropertyListConfig Id="MyAttrs"/>
      </Request>
   </soapenv:Body>
</soapenv:Envelope>

このサンプル・リクエストでは空の名前のない状態が使用されていることに注意してください。

次の省略された例は、管理属性ProductCategoryの特性を示します。この出力を使用して、属性ProductCategoryのPDRとDDRの値を表示し、属性が検索可能かどうかを示し、この管理属性のPDRとDDRに含まれる他の特性を指定できます。
<cs:Property Key="ProdType" Type="mdex:string" Dimension="true" DisplayName="Product Type" Refinable="true">
   <cs:PropertyRecord>
      <cs:attribute name="mdex-property_DisplayName" type="mdex:string">Wine Type</cs:attribute>
      <cs:attribute name="mdex-property_IsPropertyValueSearchable" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="mdex-property_IsSingleAssign" type="mdex:boolean">false</cs:attribute>
      <cs:attribute name="mdex-property_IsTextSearchable" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="mdex-property_IsUnique" type="mdex:boolean">false</cs:attribute>
      <cs:attribute name="mdex-property_Key" type="mdex:string">ProdType</cs:attribute>
      <cs:attribute name="mdex-property_Language" type="mdex:string">unknown</cs:attribute>
      <cs:attribute name="mdex-property_TextSearchAllowsWildcards" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="mdex-property_Type" type="mdex:string">mdex:string</cs:attribute>
      <cs:attribute name="system-navigation_Select" type="mdex:string">single</cs:attribute>
      <cs:attribute name="system-navigation_ShowRecordCounts" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="system-navigation_Sorting" type="mdex:string">record-count</cs:attribute>
   </cs:PropertyRecord>
   <cs:DimensionRecord>
      <cs:attribute name="mdex-dimension-value_Parent" type="mdex:string">mdex-dimension_ProdType_Parent</cs:attribute>
      <cs:attribute name="mdex-dimension-value_Spec" type="mdex:string">mdex-dimension_ProdType_Spec</cs:attribute>
      <cs:attribute name="mdex-dimension_EnableRefinements" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="mdex-dimension_IsDimensionSearchHierarchical" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="mdex-dimension_IsRecordSearchHierarchical" type="mdex:boolean">true</cs:attribute>
      <cs:attribute name="mdex-dimension_Key" type="mdex:string">WineType</cs:attribute>
   </cs:DimensionRecord>
</cs:Property>

その他の属性リスト方法

PropertyListConfigタイプの他に、2つの方法を使用してデータ・ドメイン内の属性のリストを取得できます。

次の例に示す、構成WebサービスのlistProperties操作では、データ・ドメイン内のすべての属性が返されます。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" 
   xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:configTransaction>
         <ns:listProperties/>
      </ns:configTransaction>
   </soapenv:Body>
</soapenv:Envelope>

もう1つの方法は、RecordKindフィルタをnondata値とともに使用する方法です。使用方法の詳細は、「データ・レコードとデータ以外のレコードのフィルタ」を参照してください。