# SphinxClient::setFilterRange

(PECL sphinx >= 0.1.0)

SphinxClient::setFilterRange — Add new integer range filter

### Description

public SphinxClient::setFilterRange ( string `$attribute` , int `$min` , int `$max` [, bool `$exclude` = `FALSE` ] ) : bool

Adds new integer range filter to the existing list of filters. Only those documents which have `attribute` value stored in the index between `min` and `max` (including values that are exactly equal to `min` or `max`) will be matched (or rejected, if `exclude` is `TRUE`).

### Parameters

`attribute`

  An attribute name.

`min`

  Minimum value.

`max`

  Maximum value.

`exclude`

  If set to `TRUE`, matching documents are excluded from the result set.

### Return Values

Returns `TRUE` on success or `FALSE` on failure.

### See Also

- SphinxClient::setFilterFloatRange
- SphinxClient::setFilter
- SphinxClient::resetFilters