Requesting record filters with the API

The RecordFilterOperator complex type adds a record filter component to the filter state.

Record filters are not visible in the user interface of the front-end application (so they do not appear in breadcrumbs), and are not cleared by any of the general mechanisms for clearing the state. You can remove them using a PopRecordFilterOperator.

When making a query with the Conversation Web Service, you can use a RecordFilterOperator to limit the set of returned records, as in this example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Request xmlns="http://www.endeca.com/MDEX/conversation/1/0">
      <State />
      <Operator 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xsi:type="RecordFilterOperator">
           <RecordFilter Name="ProductLine">OR(OR(ProductLine:Road),OR(ProductLine:Mountain))
           </RecordFilter>
      </Operator>
      <ContentElementConfig xsi:type="RecordListConfig" 
       HandlerFunction="RecordListHandler" 
       HandlerNamespace="http://www.endeca.com/MDEX/conversation/1/0" 
       Id="RecordList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
           <Column>ProductLine</Column> 
           <RecordsPerPage>5</RecordsPerPage>
      </ContentElementConfig>
    </Request>
  </soap:Body>
</soap:Envelope>

This example, as many other examples in this guide, is based on a sample data store representing bicycles, their models, sellers, and other related information. In this example, a record filter is specified for records that have a ProductLine attribute with a value of Mountain or Road. Only those records are returned as a result of this request.

Examples with managed attribute values

You can use a record filter to perform a record query search so that only results tagged with a specified managed attribute value are returned. For example, say you have a managed attribute hierarchy that looks like this, where Sku is the managed attribute root and 123, 456, and 789 are leaf managed attribute values:
Sku
  123
  456
  789
  ...
To perform a record query search so that results tagged with any of these managed attribute values are returned, use the following:
OR(sku/123,OR(sku/456),OR(sku/789))
To perform a record query search so that only results tagged with the managed attribute value 123 are returned, use the following:
sku/123

Note that the / (forward slash) is used as the delimiter for managed attribute value paths.