php-doc-en/reference/yaz/functions/yaz-hits.xml
Hannes Magnusson c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00

127 lines
3.5 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.yaz-hits" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>yaz_hits</refname>
<refpurpose>Returns number of hits for last search</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>yaz_hits</methodname>
<methodparam><type>resource</type><parameter>id</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">searchresult</parameter></methodparam>
</methodsynopsis>
<para>
<function>yaz_hits</function> returns the number of hits for the last
search.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>id</parameter></term>
<listitem>
<para>
The connection resource returned by <function>yaz_connect</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>searchresult</parameter></term>
<listitem>
<para>
Result array for detailed search result information.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the number of hits for the last search or 0 if no search was
performed.
</para>
<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.
</para>
<table>
<title>searchresult members</title>
<tgroup cols="2">
<colspec colwidth="1*" colname="element"/>
<colspec colwidth="2*" colname="description"/>
<thead>
<row>
<entry>Element</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>id</literal></entry>
<entry>Sub query ID2 (string)</entry>
</row>
<row>
<entry><literal>count</literal></entry>
<entry>Result count / hits (integer)</entry>
</row>
<row>
<entry><literal>subquery.term</literal></entry>
<entry>Sub query term (string)</entry>
</row>
<row>
<entry><literal>interpretation.term</literal></entry>
<entry>Interpretated sub query term (string)</entry>
</row>
<row>
<entry><literal>recommendation.term</literal></entry>
<entry>Recommended sub query term (string)</entry>
</row>
</tbody>
</tgroup>
</table>
<note>
<para>
The SearchResult facility requires PECL YAZ 1.0.5
or later and YAZ 2.1.9 or later.
</para>
</note>
<note>
<para>
Very few Z39.50 implementations support the SearchResult facility.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->