SphinxClient::setFilterRange()
(PECL sphinx >= 0.1.0)
Add new integer range filter
说明
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$attributevalue stored in the index between$minand$max(including values that are exactly equal to$minor$max)will be matched(or rejected, if$excludeis TRUE
).
参数
- $attribute
An attribute name.
- $min
Minimum value.
- $max
Maximum value.
- $exclude
If set to
TRUE
, matching documents are excluded from the result set.
返回值
成功时返回TRUE
,或者在失败时返回FALSE
。
参见
- SphinxClient::setFilterFloatRange
- SphinxClient::setFilter
- SphinxClient::resetFilters