mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
134 lines
3.8 KiB
HTML
134 lines
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Returns number of hits for last search</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.yaz-hits" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">yaz_hits</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.0.1, PECL yaz >= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_hits</span> — <span class="dc-title">Returns number of hits for last search</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.yaz-hits-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>yaz_hits</strong></span>
|
|
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span>
|
|
[, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$searchresult</code></span>
|
|
] ) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><strong>yaz_hits()</strong></span> returns the number of hits for the last
|
|
search.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.yaz-hits-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">id</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The connection resource returned by <span class="function"><a href="yaz_connect.html" class="function">yaz_connect()</a></span>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">searchresult</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
Result array for detailed search result information.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.yaz-hits-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns the number of hits for the last search or 0 if no search was
|
|
performed.
|
|
</p>
|
|
<p class="para">
|
|
The search result array (if supplied) holds information that
|
|
is returned by a Z39.50 server in the SearchResult-1
|
|
format part of a search response.
|
|
The SearchResult-1 format can be used to obtain information
|
|
about hit counts for various parts of the query (subquery).
|
|
In particular, it is possible to obtain hit counts for the individual
|
|
search terms in a query. Information for first
|
|
subquery is in $array[0], second subquery in $array[1], and so forth.
|
|
</p>
|
|
<table class="doctable table">
|
|
<caption><strong>searchresult members</strong></caption>
|
|
|
|
<col width="1*" />
|
|
<col width="2*" />
|
|
<thead>
|
|
<tr>
|
|
<th>Element</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="tbody">
|
|
<tr>
|
|
<td><em>id</em></td>
|
|
<td>Sub query ID2 (string)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><em>count</em></td>
|
|
<td>Result count / hits (integer)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><em>subquery.term</em></td>
|
|
<td>Sub query term (string)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><em>interpretation.term</em></td>
|
|
<td>Interpretated sub query term (string)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><em>recommendation.term</em></td>
|
|
<td>Recommended sub query term (string)</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
The SearchResult facility requires PECL YAZ 1.0.5
|
|
or later and YAZ 2.1.9 or later.
|
|
</p>
|
|
</p></blockquote>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
Very few Z39.50 implementations support the SearchResult facility.
|
|
</p>
|
|
</p></blockquote>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |