note 118148 added to function.yaz-range
| From: | andrew dot isherwood at ptfs-europe dot com | Date: | Wed, 14 Oct 2015 09:31:44 +0000 |
| Subject: | note 118148 added to function.yaz-range | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203956@lists.php.net to get a copy of this message | ||
Note that yaz_range probably doesn't do what you think it's going to to do. i.e. cause the
result set to be returned according to the "start" and "number" parameters you
supply.
Quoting this thread:
http://lists.indexdata.dk/pipermail/yazlist/2006-November/001752.html
"Generally, the record offset that you give to yaz_record() is the offset into the result set,
not into any subset identified by yaz_range(). This is crucial: The yaz_range() function is strictly
there to help you write more optimized client code; you do not need to call it.
In other words, if you want to display record numbers 10 to 20 from your set, you loop from 10 to 20
and call yaz_record() for each record. The underlying code will retrieve records as necessary on
demand.
However, if you call yaz_range() before you call yaz_wait(), the underlying code will optimize
it's behavior.. it will either ask the
server to return records along with the search recult, or submit a single present request to fetch
the records (if you're not asking for too many).. it makes no difference in a quick hack, but
it can make a dramatic difference if you're designing for many users or heavy traffic. Your
loop over yaz_record() will be the same whether you have called yaz_range() first, or not."
----
Server IP: 72.52.91.14
Probable Submitter: 195.166.150.188
----
Manual Page -- http://php.net/manual/en/function.yaz-range.php
Edit -- https://master.php.net/note/edit/118148
Del: integrated -- https://master.php.net/note/delete/118148/integrated
Del: useless -- https://master.php.net/note/delete/118148/useless
Del: bad code -- https://master.php.net/note/delete/118148/bad+code
Del: spam -- https://master.php.net/note/delete/118148/spam
Del: non-english -- https://master.php.net/note/delete/118148/non-english
Del: in docs -- https://master.php.net/note/delete/118148/in+docs
Del: other reasons-- https://master.php.net/note/delete/118148
Reject -- https://master.php.net/note/reject/118148
Search -- https://master.php.net/manage/user-notes.php