|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2008-09-30 08:56 UTC] tony at daylessday dot org
  [2008-09-30 09:09 UTC] iwanowski dot martin at gmail dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 15:00:01 2025 UTC | 
Description: ------------ Using SphinxClient::setLimits($offset, $limit, $max_matches, $cutoff). Documentation states the $max_matches is optional. Complete newbie that I am, looking at the source $max_matches is auto set to 0, by definition unlimited. Using this value will result in an error: per-query max_matches=0 out of bounds (per-server max_matches=1000) If $max_matches is left out by the user, it should be set to whatever value is in sphinx.conf. Or perhaps I got this all wrong? Reproduce code: --------------- <?php $s = new SphinxClient; $s->setLimits(0, 20); $result = $s->query('test'); echo $s->getLastError(); ?> Expected result: ---------------- As the documentation states (http://php.net/manual/en/sphinxclient.setlimits.php) the limit is optional, and should be set to whatever the sphinx.conf is set to if $max_matches is left out by the user.