From e05bc42cadd9b0ce2cd1847f4c3d71027a1437e6 Mon Sep 17 00:00:00 2001 From: Macrvk Date: Wed, 27 Dec 2017 12:22:41 +0100 Subject: [PATCH] SetIdRange function. --- src/sngrl/SphinxSearch/SphinxSearch.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sngrl/SphinxSearch/SphinxSearch.php b/src/sngrl/SphinxSearch/SphinxSearch.php index 87ff926..7c098a3 100644 --- a/src/sngrl/SphinxSearch/SphinxSearch.php +++ b/src/sngrl/SphinxSearch/SphinxSearch.php @@ -132,6 +132,21 @@ public function setFilterFloatRange($attribute, $min, $max, $exclude = false) return $this; } + /** + * Limit the ID range; only match records if document ID is between $min and $max (inclusive) + * + * @param integer $min minimum document ID + * @param integer $max maximum document ID + * + * @return SphinxClient + * @throws \InvalidArgumentException When $min or $max are invalid + */ + public function setIdRange($min, $max) + { + $this->_connection->setIdRange($min, $max); + return $this; + } + public function setGeoAnchor($attrlat, $attrlong, $lat = null, $long = null) { $this->_connection->setGeoAnchor($attrlat, $attrlong, $lat, $long);