Added releaseinfo
[idzebra-moved-to-github.git] / doc / querymodel.xml
index bbadb28..3a3f781 100644 (file)
@@ -1,5 +1,5 @@
  <chapter id="querymodel">
  <chapter id="querymodel">
-  <!-- $Id: querymodel.xml,v 1.25 2006-09-03 21:37:26 adam Exp $ -->
+  <!-- $Id: querymodel.xml,v 1.27 2006-11-30 10:33:19 adam Exp $ -->
   <title>Query Model</title>
   
   <section id="querymodel-overview">
   <title>Query Model</title>
   
   <section id="querymodel-overview">
@@ -41,7 +41,7 @@
       parties developing Z39.50 software, and is often referred to as
       <emphasis>Prefix Query Notation</emphasis>, or in short 
       PQN. See       
       parties developing Z39.50 software, and is often referred to as
       <emphasis>Prefix Query Notation</emphasis>, or in short 
       PQN. See       
-      <xref linkend="querymodel-pqf"/> for further explanations and
+      <xref linkend="querymodel-rpn"/> for further explanations and
       descriptions of Zebra's capabilities.  
      </para>
     </section>    
       descriptions of Zebra's capabilities.  
      </para>
     </section>    
  </section>
 
   
  </section>
 
   
-  <section id="querymodel-pqf">
-   <title>Prefix Query Format syntax and semantics</title>
+  <section id="querymodel-rpn">
+   <title>RPN queries and semantics</title>
    <para>
     The <ulink url="&url.yaz.pqf;">PQF grammar</ulink>
     is documented in the YAZ manual, and shall not be
    <para>
     The <ulink url="&url.yaz.pqf;">PQF grammar</ulink>
     is documented in the YAZ manual, and shall not be
     query parse tree. 
    </para>
    
     query parse tree. 
    </para>
    
-   <section id="querymodel-pqf-tree">
-    <title>PQF tree structure</title>
+   <section id="querymodel-rpn-tree">
+    <title>RPN tree structure</title>
     <para>
     <para>
-     The PQF parse tree - or the equivalent textual representation -
+     The RPN parse tree - or the equivalent textual representation in PQF -
      may start with one specification of the 
      <emphasis>attribute set</emphasis> used. Following is a query
      tree, which 
      may start with one specification of the 
      <emphasis>attribute set</emphasis> used. Following is a query
      tree, which 
        <thead>
        <row>
          <entry>Attribute set</entry>
        <thead>
        <row>
          <entry>Attribute set</entry>
-         <entry>Short hand</entry>
+         <entry>PQF notation (Short hand)</entry>
          <entry>Status</entry>
          <entry>Notes</entry>
         </row>
          <entry>Status</entry>
          <entry>Notes</entry>
         </row>
        
        <tbody>
         <row>
        
        <tbody>
         <row>
-         <entry><literal>Explain</literal></entry>
+         <entry>Explain</entry>
          <entry><literal>exp-1</literal></entry>
          <entry>Special attribute set used on the special automagic
           <literal>IR-Explain-1</literal> database to gain information on
          <entry><literal>exp-1</literal></entry>
          <entry>Special attribute set used on the special automagic
           <literal>IR-Explain-1</literal> database to gain information on
          <entry>predefined</entry>
         </row>
         <row>
          <entry>predefined</entry>
         </row>
         <row>
-         <entry><literal>Bib1</literal></entry>
+         <entry>Bib-1</entry>
          <entry><literal>bib-1</literal></entry>
          <entry>Standard PQF query language attribute set which defines the
           semantics of Z39.50 searching. In addition, all of the
          <entry><literal>bib-1</literal></entry>
          <entry>Standard PQF query language attribute set which defines the
           semantics of Z39.50 searching. In addition, all of the
-          non-use attributes (types 2-11) define the hard-wired 
+          non-use attributes (types 2-12) define the hard-wired 
           Zebra internal query
           processing.</entry>
          <entry>default</entry>
         </row>
         <row>
           Zebra internal query
           processing.</entry>
          <entry>default</entry>
         </row>
         <row>
-         <entry><literal>GILS</literal></entry>
+         <entry>GILS</entry>
          <entry><literal>gils</literal></entry>
          <entry><literal>gils</literal></entry>
-         <entry>Extension to the <literal>Bib1</literal> attribute set.</entry>
+         <entry>Extension to the Bib-1 attribute set.</entry>
          <entry>predefined</entry>
         </row>
         <!--
         <row>
          <entry>predefined</entry>
         </row>
         <!--
         <row>
-       <entry><literal>IDXPATH</literal></entry>
+       <entry>IDXPATH</entry>
        <entry><literal>idxpath</literal></entry>
        <entry>Hardwired XPATH like attribute set, only available for
        indexing with the GRS record model</entry>
        <entry><literal>idxpath</literal></entry>
        <entry>Hardwired XPATH like attribute set, only available for
        indexing with the GRS record model</entry>
      <note>
       <para>
        The Zebra internal query processing is modeled after 
      <note>
       <para>
        The Zebra internal query processing is modeled after 
-       the <literal>Bib1</literal> attribute set, and the non-use
+       the Bib-1 attribute set, and the non-use
        attributes type 2-6 are hard-wired in. It is therefore essential
        to be familiar with <xref linkend="querymodel-bib1-nonuse"/>. 
       </para>
        attributes type 2-6 are hard-wired in. It is therefore essential
        to be familiar with <xref linkend="querymodel-bib1-nonuse"/>. 
       </para>
        </thead>
        <tbody>
        <row><entry><literal>@and</literal></entry>
        </thead>
        <tbody>
        <row><entry><literal>@and</literal></entry>
-        <entry>binary <literal>AND</literal> operator</entry>
+        <entry>binary AND operator</entry>
         <entry>Set intersection of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@or</literal></entry>
         <entry>Set intersection of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@or</literal></entry>
-        <entry>binary <literal>OR</literal> operator</entry>
+        <entry>binary OR operator</entry>
         <entry>Set union of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@not</literal></entry>
         <entry>Set union of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@not</literal></entry>
-        <entry>binary <literal>AND NOT</literal> operator</entry>
+        <entry>binary AND NOT operator</entry>
         <entry>Set complement of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@prox</literal></entry>
         <entry>Set complement of two atomic queries hit sets</entry>
        </row>
        <row><entry><literal>@prox</literal></entry>
-        <entry>binary <literal>PROXIMITY</literal> operator</entry>
+        <entry>binary PROXIMITY operator</entry>
         <entry>Set intersection of two atomic queries hit sets. In 
          addition, the intersection set is purged for all 
          documents which do not satisfy the requested query 
         <entry>Set intersection of two atomic queries hit sets. In 
          addition, the intersection set is purged for all 
          documents which do not satisfy the requested query 
      <title>Atomic queries (APT)</title>
      <para>
       Atomic queries are the query parts which work on one access point
      <title>Atomic queries (APT)</title>
      <para>
       Atomic queries are the query parts which work on one access point
-      only. These consist of <literal>an attribute list</literal>
-      followed by a <literal>single term</literal> or a
-      <literal>quoted term list</literal>, and are often called 
+      only. These consist of <emphasis>an attribute list</emphasis>
+      followed by a <emphasis>single term</emphasis> or a
+      <emphasis>quoted term list</emphasis>, and are often called 
       <emphasis>Attributes-Plus-Terms (APT)</emphasis> queries.
      </para>
      <para>
       Atomic (APT) queries are always leaf nodes in the PQF query tree. 
       <emphasis>Attributes-Plus-Terms (APT)</emphasis> queries.
      </para>
      <para>
       Atomic (APT) queries are always leaf nodes in the PQF query tree. 
-      UN-supplied non-use attributes types 2-11 are either inherited from
+      UN-supplied non-use attributes types 2-12 are either inherited from
       higher nodes in the query tree, or are set to Zebra's default values.
       See <xref linkend="querymodel-bib1"/> for details. 
      </para>
       higher nodes in the query tree, or are set to Zebra's default values.
       See <xref linkend="querymodel-bib1"/> for details. 
      </para>
        <tbody>
         <row>
          <entry><emphasis>attribute list</emphasis></entry>
        <tbody>
         <row>
          <entry><emphasis>attribute list</emphasis></entry>
-         <entry>List of <literal>orthogonal</literal> attributes</entry>
+         <entry>List of <emphasis>orthogonal</emphasis> attributes</entry>
          <entry>Any of the orthogonal attribute types may be omitted,
           these are inherited from higher query tree nodes, or if not
           inherited, are set to the default Zebra configuration values.
          <entry>Any of the orthogonal attribute types may be omitted,
           these are inherited from higher query tree nodes, or if not
           inherited, are set to the default Zebra configuration values.
         </row>
         <row>
          <entry><emphasis>term</emphasis></entry>
         </row>
         <row>
          <entry><emphasis>term</emphasis></entry>
-         <entry>single <literal>term</literal> 
-          or <literal>quoted term list</literal>   </entry>
+         <entry>single <emphasis>term</emphasis> 
+          or <emphasis>quoted term list</emphasis>   </entry>
          <entry>Here the search terms or list of search terms is added
           to the query</entry>
         </row>
          <entry>Here the search terms or list of search terms is added
           to the query</entry>
         </row>
      </para>
 
      <para>
      </para>
 
      <para>
-      The <literal>scan</literal> operation is only supported with 
+      The <emphasis>scan</emphasis> operation is only supported with 
       atomic APT queries, as it is bound to one access point at a
       time. Boolean query trees are not allowed during
       atomic APT queries, as it is bound to one access point at a
       time. Boolean query trees are not allowed during
-      <literal>scan</literal>.
+      <emphasis>scan</emphasis>.
       </para>
      
      <para>
       </para>
      
      <para>
      
      <para>
       Defining a named result set and re-using it in the next query,
      
      <para>
       Defining a named result set and re-using it in the next query,
-      using <literal>yaz-client</literal>. Notice that the client, not
-      the server, assigns the string <literal>'1'</literal> to the
+      using <application>yaz-client</application>. Notice that the client, not
+      the server, assigns the string '1' to the
       named result set. 
       <screen>
        Z> f @attr 1=4 mozart
       named result set. 
       <screen>
        Z> f @attr 1=4 mozart
     <section id="querymodel-use-string">
      <title>Zebra's special access point of type 'string'</title>
      <para>
     <section id="querymodel-use-string">
      <title>Zebra's special access point of type 'string'</title>
      <para>
-      The numeric <literal>use (type 1)</literal> attribute is usually 
+      The numeric <emphasis>use (type 1)</emphasis> attribute is usually 
       referred to from a given
       attribute set. In addition, Zebra let you use 
       <emphasis>any internal index
       referred to from a given
       attribute set. In addition, Zebra let you use 
       <emphasis>any internal index
       As we have seen above, it is possible (albeit seldom a great
       idea) to emulate 
       <ulink url="http://www.w3.org/TR/xpath">XPath 1.0</ulink> based
       As we have seen above, it is possible (albeit seldom a great
       idea) to emulate 
       <ulink url="http://www.w3.org/TR/xpath">XPath 1.0</ulink> based
-      search by defining <literal>use (type 1)</literal> 
+      search by defining <emphasis>use (type 1)</emphasis>
       <emphasis>string</emphasis> attributes which in appearance 
       <emphasis>resemble XPath queries</emphasis>. There are two
       problems with this approach: first, the XPath-look-alike has to
       <emphasis>string</emphasis> attributes which in appearance 
       <emphasis>resemble XPath queries</emphasis>. There are two
       problems with this approach: first, the XPath-look-alike has to
       than it pretends to access. 
      </para>
      <para>
       than it pretends to access. 
      </para>
      <para>
-      When using the <literal>GRS Record Model</literal> 
+      When using the GRS Record Model
       (see  <xref linkend="grs"/>), we have the
       possibility to embed <emphasis>life</emphasis> 
       XPath expressions
       in the PQF queries, which are here called
       (see  <xref linkend="grs"/>), we have the
       possibility to embed <emphasis>life</emphasis> 
       XPath expressions
       in the PQF queries, which are here called
-      <literal>use (type 1)</literal> <emphasis>xpath</emphasis>
+      <emphasis>use (type 1)</emphasis> <emphasis>xpath</emphasis>
       attributes. You must enable the 
       <literal>xpath enable</literal> directive in your 
       <literal>.abs</literal> configuration files. 
       attributes. You must enable the 
       <literal>xpath enable</literal> directive in your 
       <literal>.abs</literal> configuration files. 
     <para>
      The Z39.50 standard defines the  
      <ulink url="&url.z39.50.explain;">Explain</ulink> attribute set
     <para>
      The Z39.50 standard defines the  
      <ulink url="&url.z39.50.explain;">Explain</ulink> attribute set
-     <literal>Exp-1</literal>, which is used to discover information 
+     Exp-1, which is used to discover information 
      about a server's search semantics and functional capabilities
      Zebra exposes a  "classic" 
      Explain database by base name <literal>IR-Explain-1</literal>, which
      about a server's search semantics and functional capabilities
      Zebra exposes a  "classic" 
      Explain database by base name <literal>IR-Explain-1</literal>, which
     </para>
    <para>
      The attribute-set <literal>exp-1</literal> consists of a single 
     </para>
    <para>
      The attribute-set <literal>exp-1</literal> consists of a single 
-     <literal>use attribute (type 1)</literal>. 
+     use attribute (type 1). 
     </para>
     <para>
      In addition, the non-Use
     </para>
     <para>
      In addition, the non-Use
-     <literal>bib-1</literal> attributes, that is, the types 
-     <literal>Relation</literal>, <literal>Position</literal>,
-     <literal>Structure</literal>, <literal>Truncation</literal>, 
-     and <literal>Completeness</literal> are imported from 
-     the <literal>bib-1</literal> attribute set, and may be used
+     Bib-1 attributes, that is, the types 
+     <emphasis>Relation</emphasis>, <emphasis>Position</emphasis>,
+     <emphasis>Structure</emphasis>, <emphasis>Truncation</emphasis>, 
+     and <emphasis>Completeness</emphasis> are imported from 
+     the Bib-1 attribute set, and may be used
      within any explain query. 
     </para>
     
      within any explain query. 
     </para>
     
    </section>
    
    <section id="querymodel-bib1">
    </section>
    
    <section id="querymodel-bib1">
-    <title>Bib1 Attribute Set</title>
+    <title>Bib-1 Attribute Set</title>
     <para>
      Most of the information contained in this section is an excerpt of
     <para>
      Most of the information contained in this section is an excerpt of
-     the <literal>ATTRIBUTE SET BIB-1 (Z39.50-1995)
-      SEMANTICS</literal>, 
-     found at <ulink url="&url.z39.50.attset.bib1.1995;">. The BIB-1
+     the ATTRIBUTE SET BIB-1 (Z39.50-1995) SEMANTICS
+     found at <ulink url="&url.z39.50.attset.bib1.1995;">. The Bib-1
       Attribute Set Semantics</ulink> from 1995, also in an updated 
      <ulink url="&url.z39.50.attset.bib1;">Bib-1
       Attribute Set</ulink> 
       Attribute Set Semantics</ulink> from 1995, also in an updated 
      <ulink url="&url.z39.50.attset.bib1;">Bib-1
       Attribute Set</ulink> 
      <filename>tab/gils.att</filename>.
      </para>
     <para>
      <filename>tab/gils.att</filename>.
      </para>
     <para>
-      For example, some few  <literal>Bib-1</literal> use
+      For example, some few Bib-1 use
       attributes from the  <filename>tab/bib1.att</filename> are:
       <screen>
        att 1               Personal-name
       attributes from the  <filename>tab/bib1.att</filename> are:
       <screen>
        att 1               Personal-name
         <row>
          <entry>AlwaysMatches</entry>
          <entry>103</entry>
         <row>
          <entry>AlwaysMatches</entry>
          <entry>103</entry>
-         <entry>supported</entry>
+         <entry>supported *</entry>
         </row>
        </tbody>
       </tgroup>
      </table>
         </row>
        </tbody>
       </tgroup>
      </table>
+     <note>
+      <para>
+       AlwaysMatches searches are only supported if alwaysmatches indexing
+       has been enabled. See <xref linkend="default-idx-file"/>
+      </para>
+      </note>
      
      <para>
       The relation attributes 1-5 are supported and work exactly as
       expected.
       All ordering operations are based on a lexicographical ordering, 
       <emphasis>expect</emphasis> when the 
      
      <para>
       The relation attributes 1-5 are supported and work exactly as
       expected.
       All ordering operations are based on a lexicographical ordering, 
       <emphasis>expect</emphasis> when the 
-      <literal>structure attribute numeric (109)</literal> is used. In
+      structure attribute numeric (109) is used. In
       this case, ordering is numerical. See 
       <xref linkend="querymodel-bib1-structure"/>.
       <screen>
       this case, ordering is numerical. See 
       <xref linkend="querymodel-bib1-structure"/>.
       <screen>
 
      <para>
       The relation attribute 
 
      <para>
       The relation attribute 
-      <literal>Relevance (102)</literal> is supported, see
+      <emphasis>Relevance (102)</emphasis> is supported, see
       <xref linkend="administration-ranking"/> for full information.
      </para>
      
       <xref linkend="administration-ranking"/> for full information.
      </para>
      
 
      <para>
       The relation attribute 
 
      <para>
       The relation attribute 
-      <literal>AlwaysMatches (103)</literal> is in the default
+      <emphasis>AlwaysMatches (103)</emphasis> is in the default
       configuration
       supported in conjecture with structure attribute 
       configuration
       supported in conjecture with structure attribute 
-      <literal>Phrase (1)</literal> (which may be omitted by
+      <emphasis>Phrase (1)</emphasis> (which may be omitted by
       default). 
       It can be configured to work with other structure attributes,
       see the configuration file 
       default). 
       It can be configured to work with other structure attributes,
       see the configuration file 
        <xref linkend="querymodel-pqf-apt-mapping"/>. 
      </para>
      <para>
        <xref linkend="querymodel-pqf-apt-mapping"/>. 
      </para>
      <para>
-      <literal>AlwaysMatches (103)</literal> is a
+      <emphasis>AlwaysMatches (103)</emphasis> is a
       great way to discover how many documents have been indexed in a
       given field. The search term is ignored, but needed for correct
       PQF syntax. An empty search term may be supplied.
       great way to discover how many documents have been indexed in a
       given field. The search term is ignored, but needed for correct
       PQF syntax. An empty search term may be supplied.
         <row>
          <entry>First in field </entry>
          <entry>1</entry>
         <row>
          <entry>First in field </entry>
          <entry>1</entry>
-         <entry>unsupported</entry>
+         <entry>supported *</entry>
         </row>
         <row>
          <entry>First in subfield</entry>
          <entry>2</entry>
         </row>
         <row>
          <entry>First in subfield</entry>
          <entry>2</entry>
-         <entry>unsupported</entry>
+         <entry>supported *</entry>
         </row>
         <row>
          <entry>Any position in field</entry>
          <entry>3</entry>
         </row>
         <row>
          <entry>Any position in field</entry>
          <entry>3</entry>
-         <entry>supported</entry>
+         <entry>default</entry>
         </row>
        </tbody>
       </tgroup>
      </table>
         </row>
        </tbody>
       </tgroup>
      </table>
-    <para>
-      The position attribute values <literal>first in field (1)</literal>,
-      and <literal>first in subfield(2)</literal> are unsupported.
-      Using them silently maps to 
-      <literal>any position in field (3)</literal>. A proper diagnostic
-      should have been issued.
+
+     <note>
+      <para>
+       Zebra only supports first-in-field seaches if the
+       <literal>firstinfield</literal> is enabled for the index
+       Refer to <xref linkend="default-idx-file"/>.
+       Zebra does not distinguish between first in field and
+       first in subfield. They result in the same hit count.
+       Searching for first position in (sub)field in only supported in Zebra
+       2.0.2 and later.
       </para>
       </para>
+     </note>
     </section>
     
     <section id="querymodel-bib1-structure">
     </section>
     
     <section id="querymodel-bib1-structure">
 
 
   <section id="querymodel-zebra">
 
 
   <section id="querymodel-zebra">
-   <title>Advanced Zebra PQF Features</title>
+   <title>Extended Zebra RPN Features</title>
    <para>
     The Zebra internal query engine has been extended to specific needs
     not covered by the <literal>bib-1</literal> attribute set query
     model. These extensions are <emphasis>non-standard</emphasis>
     and <emphasis>non-portable</emphasis>: most functional extensions
     are modeled over the <literal>bib-1</literal> attribute set,
    <para>
     The Zebra internal query engine has been extended to specific needs
     not covered by the <literal>bib-1</literal> attribute set query
     model. These extensions are <emphasis>non-standard</emphasis>
     and <emphasis>non-portable</emphasis>: most functional extensions
     are modeled over the <literal>bib-1</literal> attribute set,
-    defining type 7-9 attributes.
+    defining type 7 and higher values.
     There are also the special 
     <literal>string</literal> type index names for the
     <literal>idxpath</literal> attribute set.  
     There are also the special 
     <literal>string</literal> type index names for the
     <literal>idxpath</literal> attribute set.  
    <section id="querymodel-zebra-attr-search">
     <title>Zebra specific Search Extensions to all Attribute Sets</title>
     <para>
    <section id="querymodel-zebra-attr-search">
     <title>Zebra specific Search Extensions to all Attribute Sets</title>
     <para>
-     Zebra extends the Bib1 attribute types, and these extensions are
+     Zebra extends the Bib-1 attribute types, and these extensions are
      recognized regardless of attribute 
      set used in a <literal>search</literal> operation query.
     </para>
      recognized regardless of attribute 
      set used in a <literal>search</literal> operation query.
     </para>
        <entry>1.1</entry>
        </row>
        <row>
        <entry>1.1</entry>
        </row>
        <row>
-       <entry>Approx Limit</entry>
-       <entry>11</entry>
+       <entry>Term Reference</entry>
+       <entry>10</entry>
        <entry>search</entry>
        <entry>1.4</entry>
        </row>
        <row>
        <entry>search</entry>
        <entry>1.4</entry>
        </row>
        <row>
-       <entry>Term Reference</entry>
-       <entry>10</entry>
+       <entry>Local Approx Limit</entry>
+       <entry>11</entry>
        <entry>search</entry>
        <entry>1.4</entry>
        </row>
        <entry>search</entry>
        <entry>1.4</entry>
        </row>
+       <row>
+       <entry>Global Approx Limit</entry>
+       <entry>12</entry>
+       <entry>search</entry>
+       <entry>2.0.8</entry>
+       </row>
       </tbody>
      </tgroup>
     </table>      
       </tbody>
      </tgroup>
     </table>      
        Z> find @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 utah
       </screen>
      </para>
        Z> find @attr 2=102 @or @attr 9=30 @attr 1=4 utah @attr 9=20 utah
       </screen>
      </para>
-     </section>
+    </section>
+
+    <section id="querymodel-zebra-attr-termref">
+     <title>Zebra Extension Term Reference Attribute (type 10)</title>
+     <para>
+      Zebra supports the searchResult-1 facility. 
+      If the Term Reference Attribute (type 10) is
+      given, that specifies a subqueryId value returned as part of the
+      search result. It is a way for a client to name an APT part of a
+      query. 
+     </para>
+     <!--
+     <para>
+     <screen>
+    </screen>
+    </para>
+     -->
+     <warning>
+      <para>
+       Experimental. Do not use in production code.
+       </para>
+     </warning>
      
      
-    <section id="querymodel-zebra-attr-limit">
-     <title>Zebra Extension Approximative Limit Attribute (type 11)</title>
+    </section>
+   
+   
+     
+    <section id="querymodel-zebra-local-attr-limit">
+     <title>Local Approximative Limit Attribute (type 11)</title>
      <para>
      <para>
-      Zebra  computes - unless otherwise configured -
+      Zebra computes - unless otherwise configured -
       the exact hit count for every APT
       (leaf) in the query tree. These hit counts are returned as part of
       the searchResult-1 facility in the binary encoded Z39.50 search
       the exact hit count for every APT
       (leaf) in the query tree. These hit counts are returned as part of
       the searchResult-1 facility in the binary encoded Z39.50 search
       <para>
        Do not use approximative hit count limits
        in conjunction with relevance ranking, as re-sorting of the
       <para>
        Do not use approximative hit count limits
        in conjunction with relevance ranking, as re-sorting of the
-       result set obviosly only works when the entire result set has
+       result set only works when the entire result set has
        been processed. 
       </para>
      </warning>
        been processed. 
       </para>
      </warning>
-     <warning>
-      <para>
-       This facility clashes with rank weight, because there all
-       documents in the hit lists need to be examined for scoring and
-       re-sorting.
-       It is an experimental
-       extension. Do not use in production code.
-      </para>
-     </warning>
     </section>
 
     </section>
 
-    <section id="querymodel-zebra-attr-termref">
-     <title>Zebra Extension Term Reference Attribute (type 10)</title>
+    <section id="querymodel-zebra-global-attr-limit">
+     <title>Global Approximative Limit Attribute (type 12)</title>
      <para>
      <para>
-      Zebra supports the searchResult-1 facility. 
-      If the Term Reference Attribute (type 10) is
-      given, that specifies a subqueryId value returned as part of the
-      search result. It is a way for a client to name an APT part of a
-      query. 
+      By default Zebra computes precise hit counts for a query as
+      a whole. Setting attribute 12 makes it perform approximative
+      hit counts instead. It has the same semantics as 
+      <literal>estimatehits</literal> for the <xref linkend="zebra-cfg"/>.
      </para>
      </para>
-     <!--
      <para>
      <para>
-     <screen>
-    </screen>
-    </para>
-     -->
+      The attribute (12) can occur anywhere in the query tree.
+      Unlike regular attributes it does not relate to the leaf (APT)
+      - but to the whole query.
+     </para>
      <warning>
       <para>
      <warning>
       <para>
-       Experimental. Do not use in production code.
-       </para>
+       Do not use approximative hit count limits
+       in conjunction with relevance ranking, as re-sorting of the
+       result set only works when the entire result set has
+       been processed. 
+      </para>
      </warning>
      </warning>
-     
     </section>
     </section>
+
    </section>
    </section>
-    
 
    <section id="querymodel-zebra-attr-scan">
     <title>Zebra specific Scan Extensions to all Attribute Sets</title>
 
    <section id="querymodel-zebra-attr-scan">
     <title>Zebra specific Scan Extensions to all Attribute Sets</title>
       </screen>
      </para>
      
       </screen>
      </para>
      
-    <warning>
-      <para>
-       Experimental. Do not use in production code.
-      </para>
-     </warning>
+     <para>
+      Zebra 2.0.2 and later is able to skip 0 hit counts. This, however,
+      is known not to scale if the number of terms to skip is high.
+      This most likely will happen if the result set is small (and
+      result in many 0 hits).
+     </para>
     </section>
 
     <section id="querymodel-zebra-attr-approx">
     </section>
 
     <section id="querymodel-zebra-attr-approx">
       enable approximate hit counts for scan hit counts, in the same
       way as for search hit counts. 
      </para>
       enable approximate hit counts for scan hit counts, in the same
       way as for search hit counts. 
      </para>
-     <!--
-     <para>
-     <screen>
-    </screen>
-    </para>
-     -->
-     <warning>
-      <para>
-       Experimental and buggy. Definitely not to be used in production code.
-      </para>
-     </warning>
     </section>
    </section>
    
     </section>
    </section>
    
    <para>
     Exhaustive information can be found in the
     Section "Specification of CQL to RPN mappings" in the YAZ manual.
    <para>
     Exhaustive information can be found in the
     Section "Specification of CQL to RPN mappings" in the YAZ manual.
-    <ulink url="http://www.indexdata.dk/yaz/doc/tools.tkl#tools.cql.map">
-     http://www.indexdata.dk/yaz/doc/tools.tkl#tools.cql.map</ulink>,
-   and shall therefore not be repeated here.
+    <ulink url="&url.yaz.cql2pqf;"/>,
+     and shall therefore not be repeated here.
    </para> 
   <!-- 
   <para>
     See 
    </para> 
   <!-- 
   <para>
     See 
-      <ulink url="http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html">
-      http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html</ulink>
-    for the Maintenance Agency's work-in-progress mapping of Dublin Core
+   <ulink url="http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html"/>
+   for the Maintenance Agency's work-in-progress mapping of Dublin Core
     indexes to Attribute Architecture (util, XD and BIB-2)
     indexes to Attribute Architecture (util, XD and BIB-2)
-    attributes.
-   </para>
+   attributes.
+  </para>
    -->
  </section>
 
    -->
  </section>