Initial commit
[yaz4j-moved-to-github.git] / dependencies / yaz-2.1.28 / doc / client.searching.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4. Searching</title><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="client.html" title="Chapter 5. The YAZ client"><link rel="prev" href="client.commands.html" title="3. Commands"><link rel="next" href="asn.html" title="Chapter 6. The Z39.50 ASN.1 Module"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4. Searching</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="client.commands.html">Prev</a> </td><th width="60%" align="center">Chapter 5. The YAZ client</th><td width="20%" align="right"> <a accesskey="n" href="asn.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="client.searching"></a>4. Searching</h2></div></div></div><p>
2     The simplest example of a Prefix Query would be something like
3     </p><pre class="screen">
4      f knuth
5     </pre><p>
6     or
7     </p><pre class="screen">
8      f "donald knuth"
9     </pre><p>
10     In those queries no attributes was specified.
11     This leaves it up to the server what fields to search but
12     most servers will search in all fields. Some servers does not
13     support this feature though, and require that some attributes
14     are defined. To add one attribute you could do:
15     </p><pre class="screen">
16      f @attr 1=4 computer
17     </pre><p>
18     where we search in the title field, since the use(1) is title(4).
19     If we want to search in the author field <span class="emphasis"><em>and</em></span>
20     in the title field, and in the title field using right truncation
21     it could look something like this:
22     </p><pre class="screen">
23      f @and @attr 1=1003 knuth @attr 1=4 @attr 5=1 computer
24     </pre><p>
25     Finally using a mix of Bib-1 and GILS attributes could look
26     something like this:
27     </p><pre class="screen">
28      f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather
29     </pre><p>
30     For the full specification of the Prefix Query see the section
31      <a href="tools.html#PQF" title="1.1. Prefix Query Format">Prefix Query Format</a>.
32    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="client.commands.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="client.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asn.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3. Commands </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. The Z39.50 ASN.1 Module</td></tr></table></div></body></html>