Examples of range filter parameters

This topic shows some valid examples of range filter queries.

Consider the following examples that use these four records:

Record Product line managed attribute value ListPrice attribute
1 Mountain (Value 101) 200
2 Mountain (Value 101) 275
3 Road (Value 102) 175
4 Other (Value 103) 150

Example 1

Assume that the following query is created:
<cs:Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:type="RangeFilterOperator">
  <cs:RangeFilter AttributeName="ListPrice">
     <cs:LowerBound Inclusive="true">200</cs:LowerBound>
  </cs:RangeFilter>
</cs:Operator>
This request has a range filter specifying the ListPrice attribute should be greater than 200 (with no managed attribute values specified). The following objects are returned:
  • 2 records (records 1 and 2)

Example 2

This example uses the following query:
<cs:Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:type="RangeFilterOperator">
  <cs:RangeFilter AttributeName="Mountain">
     <cs:UpperBound Inclusive="true">250</cs:UpperBound>
  </cs:RangeFilter>
</cs:Operator>
This request specifies the Mountain value (value 101) and a range filter specifying a price less than 250. The following objects are returned:
  • 1 record (record 1)
  • (No additional refinements)

Example 3

This query:
<cs:Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:type="RangeFilterOperator">
  <cs:RangeFilter AttributeName="ListPrice">
     <cs:LowerBound Inclusive="false">140</cs:LowerBound>
     <cs:UpperBound Inclusive="false">180</cs:UpperBound>
  </cs:RangeFilter>
</cs:Operator>
would return records 3 and 4 from the sample record set.