1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<html><head><meta charset="ISO-8859-1"><title>8.Facets</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="tools.html" title="Chapter7.Supporting Tools"><link rel="prev" href="sorting.html" title="7.Sorting"><link rel="next" href="odr.html" title="Chapter8.The ODR 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">8.Facets</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sorting.html">Prev</a></td><th width="60%" align="center">Chapter7.Supporting Tools</th><td width="20%" align="right"><a accesskey="n" href="odr.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="facets"></a>8.Facets</h2></div></div></div><p>
YAZ supports facets in the Solr, SRU 2.0 and Z39.50 protocols.
</p><p>
Like Type-1/RPN, YAZ supports a string notation for specifying
facets. This notataion maps straight to facets.asn.
The notation is parsed by function
<code class="function">yaz_pqf_parse_facet_list</code> defined in header
<code class="filename">yaz/pquery.h</code>.
</p><p>
For ZOOM C the facets are specified by option "facets".
For yaz-client, the 'facets' command is used.
</p><p>
The grammar of this specification is as follows:
</p><div class="literallayout"><p><br>
facet-spec::=facet-list<br>
<br>
facet-list::=facet-list','attr-spec|attr-spec<br>
<br>
attr-spec::=attr-spec'@attr'string|'@attr'string<br>
<br>
</p></div><p>
The notation is inspired by PQF. The string following '@attr'
must not include blanks and is of the form
<em class="replaceable"><code>type</code></em><code class="literal">=</code><em class="replaceable"><code>value</code></em>,
where <em class="replaceable"><code>type</code></em> is an integer and
<em class="replaceable"><code>value</code></em> is a string or an integer.
</p><p>
There is no formal facets attribute set (it is not given in the
protocol by the facets, although it could). The following types apply:
</p><div class="table"><a name="facet.attributes"></a><p class="title"><b>Table7.4.Facet attributes</b></p><div class="table-contents"><table class="table" summary="Facet attributes" border="1"><colgroup><col class="type"><col class="description"></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>
Field-name. This is often a string, e.g. "Author", "Year", etc.
</td></tr><tr><td>2</td><td>
Sort order. Value should be an integer.
Value 0: count descending (frequency). Value 1: alpha ascending.
</td></tr><tr><td>3</td><td>
Number of terms requested.
</td></tr><tr><td>4</td><td>
Start offset (starting from 1)
</td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sorting.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="tools.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="odr.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">7.Sorting</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">Chapter8.The ODR Module</td></tr></table></div></body></html>
|