/usr/share/doc/idzebra-2.0-doc/idzebra-2.0/querymodel.html is in idzebra-2.0-doc 2.0.59-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Query Model</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Zebra - User's Guide and Reference"><link rel="up" href="index.html" title="Zebra - User's Guide and Reference"><link rel="prev" href="special-retrieval.html" title="4. Retrieval of Zebra internal record data"><link rel="next" href="querymodel-rpn.html" title="2. RPN queries and semantics"></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">Chapter 5. Query Model</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="special-retrieval.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="querymodel-rpn.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="querymodel"></a>Chapter 5. Query Model</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="querymodel.html#querymodel-overview">1. Query Model Overview</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel.html#querymodel-query-languages">1.1. Query Languages</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel.html#querymodel-query-languages-pqf">1.1.1. Prefix Query Format (<acronym class="acronym">PQF</acronym>)</a></span></dt><dt><span class="section"><a href="querymodel.html#querymodel-query-languages-cql">1.1.2. Common Query Language (<acronym class="acronym">CQL</acronym>)</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel.html#querymodel-operation-types">1.2. Operation types</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel.html#querymodel-operation-type-explain">1.2.1. Explain Operation</a></span></dt><dt><span class="section"><a href="querymodel.html#querymodel-operation-type-search">1.2.2. Search Operation</a></span></dt><dt><span class="section"><a href="querymodel.html#querymodel-operation-type-scan">1.2.3. Scan Operation</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="querymodel-rpn.html">2. <acronym class="acronym">RPN</acronym> queries and semantics</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-rpn.html#querymodel-rpn-tree">2.1. <acronym class="acronym">RPN</acronym> tree structure</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-rpn.html#querymodel-attribute-sets">2.1.1. Attribute sets</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-boolean-operators">2.1.2. Boolean operators</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-atomic-queries">2.1.3. Atomic queries (<acronym class="acronym">APT</acronym>)</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-resultset">2.1.4. Named Result Sets</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-use-string">2.1.5. <span class="application">Zebra</span>'s special access point of type 'string'</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-use-xpath">2.1.6. <span class="application">Zebra</span>'s special access point of type 'XPath'
for <acronym class="acronym">GRS-1</acronym> filters</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-rpn.html#querymodel-exp1">2.2. Explain Attribute Set</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-rpn.html#querymodel-exp1-use">2.2.1. Use Attributes (type = 1)</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-examples">2.2.2. Explain searches with yaz-client</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1">2.3. <acronym class="acronym">BIB-1</acronym> Attribute Set</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-use">2.3.1. Use Attributes (type 1)</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-nonuse">2.4. <span class="application">Zebra</span> general Bib1 Non-Use Attributes (type 2-6)</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-relation">2.4.1. Relation Attributes (type 2)</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-position">2.4.2. Position Attributes (type 3)</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-structure">2.4.3. Structure Attributes (type 4)</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-truncation">2.4.4. Truncation Attributes (type = 5)</a></span></dt><dt><span class="section"><a href="querymodel-rpn.html#querymodel-bib1-completeness">2.4.5. Completeness Attributes (type = 6)</a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="querymodel-zebra.html">3. Extended <span class="application">Zebra</span> <acronym class="acronym">RPN</acronym> Features</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-allrecords">3.1. <span class="application">Zebra</span> specific retrieval of all records</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-search">3.2. <span class="application">Zebra</span> specific Search Extensions to all Attribute Sets</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-sorting">3.2.1. <span class="application">Zebra</span> Extension Embedded Sort Attribute (type 7)</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-weight">3.2.2. <span class="application">Zebra</span> Extension Rank Weight Attribute (type 9)</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-termref">3.2.3. <span class="application">Zebra</span> Extension Term Reference Attribute (type 10)</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-local-attr-limit">3.2.4. Local Approximative Limit Attribute (type 11)</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-global-attr-limit">3.2.5. Global Approximative Limit Attribute (type 12)</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-scan">3.3. <span class="application">Zebra</span> specific Scan Extensions to all Attribute Sets</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-narrow">3.3.1. <span class="application">Zebra</span> Extension Result Set Narrow (type 8)</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-zebra-attr-approx">3.3.2. <span class="application">Zebra</span> Extension Approximative Limit (type 12)</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-zebra.html#querymodel-idxpath">3.4. <span class="application">Zebra</span> special <acronym class="acronym">IDXPATH</acronym> Attribute Set for <acronym class="acronym">GRS-1</acronym> indexing</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-zebra.html#querymodel-idxpath-use">3.4.1. <acronym class="acronym">IDXPATH</acronym> Use Attributes (type = 1)</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-zebra.html#querymodel-pqf-apt-mapping">3.5. Mapping from <acronym class="acronym">PQF</acronym> atomic <acronym class="acronym">APT</acronym> queries to <span class="application">Zebra</span> internal
register indexes</a></span></dt><dd><dl><dt><span class="section"><a href="querymodel-zebra.html#querymodel-pqf-apt-mapping-accesspoint">3.5.1. Mapping of <acronym class="acronym">PQF</acronym> <acronym class="acronym">APT</acronym> access points</a></span></dt><dt><span class="section"><a href="querymodel-zebra.html#querymodel-pqf-apt-mapping-structuretype">3.5.2. Mapping of <acronym class="acronym">PQF</acronym> <acronym class="acronym">APT</acronym> structure and completeness to
register type</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-zebra.html#querymodel-regular">3.6. <span class="application">Zebra</span> Regular Expressions in Truncation Attribute (type = 5)</a></span></dt></dl></dd><dt><span class="section"><a href="querymodel-cql-to-pqf.html">4. Server Side <acronym class="acronym">CQL</acronym> to <acronym class="acronym">PQF</acronym> Query Translation</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="querymodel-overview"></a>1. Query Model Overview</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="querymodel-query-languages"></a>1.1. Query Languages</h3></div></div></div><p>
<span class="application">Zebra</span> is born as a networking Information Retrieval engine adhering
to the international standards
<a class="ulink" href="http://www.loc.gov/z3950/agency/" target="_top"><acronym class="acronym">Z39.50</acronym></a> and
<a class="ulink" href="http://www.loc.gov/standards/sru/" target="_top"><acronym class="acronym">SRU</acronym></a>,
and implement the
type-1 Reverse Polish Notation (<acronym class="acronym">RPN</acronym>) query
model defined there.
Unfortunately, this model has only defined a binary
encoded representation, which is used as transport packaging in
the <acronym class="acronym">Z39.50</acronym> protocol layer. This representation is not human
readable, nor defines any convenient way to specify queries.
</p><p>
Since the type-1 (<acronym class="acronym">RPN</acronym>)
query structure has no direct, useful string
representation, every client application needs to provide some
form of mapping from a local query notation or representation to it.
</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="querymodel-query-languages-pqf"></a>1.1.1. Prefix Query Format (<acronym class="acronym">PQF</acronym>)</h4></div></div></div><p>
Index Data has defined a textual representation in the
<a class="ulink" href="http://www.indexdata.com/yaz/doc/tools.html#PQF" target="_top">Prefix Query Format</a>, short
<span class="emphasis"><em><acronym class="acronym">PQF</acronym></em></span>, which maps
one-to-one to binary encoded
<span class="emphasis"><em>type-1 <acronym class="acronym">RPN</acronym></em></span> queries.
<acronym class="acronym">PQF</acronym> has been adopted by other
parties developing <acronym class="acronym">Z39.50</acronym> software, and is often referred to as
<span class="emphasis"><em>Prefix Query Notation</em></span>, or in short
<acronym class="acronym">PQN</acronym>. See
<a class="xref" href="querymodel-rpn.html" title="2. RPN queries and semantics">Section 2, “<acronym class="acronym">RPN</acronym> queries and semantics”</a> for further explanations and
descriptions of <span class="application">Zebra</span>'s capabilities.
</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="querymodel-query-languages-cql"></a>1.1.2. Common Query Language (<acronym class="acronym">CQL</acronym>)</h4></div></div></div><p>
The query model of the type-1 <acronym class="acronym">RPN</acronym>,
expressed in <acronym class="acronym">PQF</acronym>/<acronym class="acronym">PQN</acronym> is natively supported.
On the other hand, the default <acronym class="acronym">SRU</acronym>
web services <span class="emphasis"><em>Common Query Language</em></span>
<a class="ulink" href="http://www.loc.gov/standards/sru/cql/" target="_top"><acronym class="acronym">CQL</acronym></a> is not natively supported.
</p><p>
<span class="application">Zebra</span> can be configured to understand and map <acronym class="acronym">CQL</acronym> to <acronym class="acronym">PQF</acronym>. See
<a class="xref" href="querymodel-cql-to-pqf.html" title="4. Server Side CQL to PQF Query Translation">Section 4, “Server Side <acronym class="acronym">CQL</acronym> to <acronym class="acronym">PQF</acronym> Query Translation”</a>.
</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="querymodel-operation-types"></a>1.2. Operation types</h3></div></div></div><p>
<span class="application">Zebra</span> supports all of the three different
<acronym class="acronym">Z39.50</acronym>/<acronym class="acronym">SRU</acronym> operations defined in the
standards: explain, search,
and scan. A short description of the
functionality and purpose of each is quite in order here.
</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="querymodel-operation-type-explain"></a>1.2.1. Explain Operation</h4></div></div></div><p>
The <span class="emphasis"><em>syntax</em></span> of <acronym class="acronym">Z39.50</acronym>/<acronym class="acronym">SRU</acronym> queries is
well known to any client, but the specific
<span class="emphasis"><em>semantics</em></span> - taking into account a
particular servers functionalities and abilities - must be
discovered from case to case. Enters the
explain operation, which provides the means for learning which
<span class="emphasis"><em>fields</em></span> (also called
<span class="emphasis"><em>indexes</em></span> or <span class="emphasis"><em>access points</em></span>)
are provided, which default parameter the server uses, which
retrieve document formats are defined, and which specific parts
of the general query model are supported.
</p><p>
The <acronym class="acronym">Z39.50</acronym> embeds the explain operation
by performing a
search in the magic
<code class="literal">IR-Explain-1</code> database;
see <a class="xref" href="querymodel-rpn.html#querymodel-exp1" title="2.2. Explain Attribute Set">Section 2.2, “Explain Attribute Set”</a>.
</p><p>
In <acronym class="acronym">SRU</acronym>, explain is an entirely separate
operation, which returns an ZeeRex <acronym class="acronym">XML</acronym> record according to the
structure defined by the protocol.
</p><p>
In both cases, the information gathered through
explain operations can be used to
auto-configure a client user interface to the servers
capabilities.
</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="querymodel-operation-type-search"></a>1.2.2. Search Operation</h4></div></div></div><p>
Search and retrieve interactions are the raison d'être.
They are used to query the remote database and
return search result documents. Search queries span from
simple free text searches to nested complex boolean queries,
targeting specific indexes, and possibly enhanced with many
query semantic specifications. Search interactions are the heart
and soul of <acronym class="acronym">Z39.50</acronym>/<acronym class="acronym">SRU</acronym> servers.
</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="querymodel-operation-type-scan"></a>1.2.3. Scan Operation</h4></div></div></div><p>
The scan operation is a helper functionality,
which operates on one index or access point a time.
</p><p>
It provides
the means to investigate the content of specific indexes.
Scanning an index returns a handful of terms actually found in
the indexes, and in addition the scan
operation returns the number of documents indexed by each term.
A search client can use this information to propose proper
spelling of search terms, to auto-fill search boxes, or to
display controlled vocabularies.
</p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="special-retrieval.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="querymodel-rpn.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4. Retrieval of <span class="application">Zebra</span> internal record data </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2. <acronym class="acronym">RPN</acronym> queries and semantics</td></tr></table></div></body></html>
|