Less-than range filter format

The UpperBound element lets you make less-than range filter queries.

To make a less-than query, use only the UpperBound element. Because you are specifying only the upper bound of the range, all returned records will fall below this bound (i.e., be less than the upper bound).

In addition, the Inclusive attribute determines whether the specified value is included in the range:
  • If Inclusive is set to false, the value for the UpperBound element is exclusive. That is, the specified value for the UpperBound element is not included in the range.
  • If Inclusive is set to true, the value for the UpperBound element is inclusive.

The default for the Inclusive attribute is false (that is, if you omit the attribute, the query will work as if you had specified false for this attribute).

Less-than example

The following is an example of an inclusive less-than query:
<cs:Request xmlns="http://www.endeca.com/MDEX/conversation/1/0">
   <cs:State/>
   <cs:Operator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:type="RangeFilterOperator">
     <cs:RangeFilter AttributeName="ListPrice">
        <cs:UpperBound Inclusive="true">250</cs:UpperBound>
     </cs:RangeFilter>
   </cs:Operator>
   <cs: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" />
</cs:Request>

This example returns all items whose price is up to, and including, $250.

In the example, if Inclusive had been set to false, the query would return all items whose price is up to, but not including, $250.