Updates for first-in-field support + alwaysmathces searches. Refer to native
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 22 Sep 2006 12:34:45 +0000 (12:34 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 22 Sep 2006 12:34:45 +0000 (12:34 +0000)
query support as RPN rather than PQF.

doc/architecture.xml
doc/examples.xml
doc/field-structure.xml
doc/indexdata.xml
doc/installation.xml
doc/introduction.xml
doc/license.xml
doc/querymodel.xml
doc/recordmodel-alvisxslt.xml

index 307b828..b139038 100644 (file)
@@ -1,5 +1,5 @@
  <chapter id="architecture">
  <chapter id="architecture">
-  <!-- $Id: architecture.xml,v 1.12 2006-09-03 21:37:26 adam Exp $ -->
+  <!-- $Id: architecture.xml,v 1.13 2006-09-22 12:34:45 adam Exp $ -->
   <title>Overview of Zebra Architecture</title>
   
 
   <title>Overview of Zebra Architecture</title>
   
 
     <para>
      In addition to Z39.50 requests, the YAZ server frontend acts
      as HTTP server, honoring
     <para>
      In addition to Z39.50 requests, the YAZ server frontend acts
      as HTTP server, honoring
-      <ulink url="http://www.loc.gov/standards/sru/srw/">SRW</ulink> 
-     SOAP requests, and  
-     <ulink url="&url.sru;">SRU</ulink> 
-     REST requests. Moreover, it can
+      <ulink url="&url.srw;">SRU SOAP</ulink> 
+     requests, and  
+     <ulink url="&url.sru;">SRU REST</ulink> 
+     requests. Moreover, it can
      translate incoming 
      <ulink url="&url.cql;">CQL</ulink>
      queries to
      translate incoming 
      <ulink url="&url.cql;">CQL</ulink>
      queries to
-     <ulink url="http://indexdata.com/yaz/doc/tools.tkl#PQF">PQF</ulink>
+     <ulink url="&url.yaz.pqf;">PQF</ulink>
       queries, if
      correctly configured. 
     </para>
     <para>
       queries, if
      correctly configured. 
     </para>
     <para>
-     <ulink url="http://www.indexdata.com/yaz">YAZ</ulink>
+     <ulink url="&url.yaz;">YAZ</ulink>
      is an Open Source  
      toolkit that allows you to develop software using the
      ANSI Z39.50/ISO23950 standard for information retrieval.
      is an Open Source  
      toolkit that allows you to develop software using the
      ANSI Z39.50/ISO23950 standard for information retrieval.
       The Debian  package 
       <literal>libidzebra-2.0-mod-grs-xml</literal> includes the 
       <emphasis>grs.xml</emphasis> filter which uses <ulink
       The Debian  package 
       <literal>libidzebra-2.0-mod-grs-xml</literal> includes the 
       <emphasis>grs.xml</emphasis> filter which uses <ulink
-      url="http://expat.sourceforge.net/">Expat</ulink> to 
+      url="&url.expat;">Expat</ulink> to 
       parse records in XML and turn them into IDZebra's internal GRS node
       trees. Have also a look at the Alvis XML/XSLT filter described in
       the next session.
       parse records in XML and turn them into IDZebra's internal GRS node
       trees. Have also a look at the Alvis XML/XSLT filter described in
       the next session.
index 298df4b..d37463f 100644 (file)
@@ -1,12 +1,13 @@
 <chapter id="examples">
 <chapter id="examples">
- <!-- $Id: examples.xml,v 1.23 2006-09-03 21:37:26 adam Exp $ -->
+ <!-- $Id: examples.xml,v 1.24 2006-09-22 12:34:45 adam Exp $ -->
  <title>Example Configurations</title>
 
  <sect1 id="examples-overview">
   <title>Overview</title>
 
   <para>
  <title>Example Configurations</title>
 
  <sect1 id="examples-overview">
   <title>Overview</title>
 
   <para>
-   <literal>zebraidx</literal> and <literal>zebrasrv</literal> are both
+   <command>zebraidx</command> and 
+   <command>zebrasrv</command> are both
    driven by a master configuration file, which may refer to other
    subsidiary configuration files.  By default, they try to use
    <filename>zebra.cfg</filename> in the working directory as the
    driven by a master configuration file, which may refer to other
    subsidiary configuration files.  By default, they try to use
    <filename>zebra.cfg</filename> in the working directory as the
@@ -65,9 +66,9 @@
   <para>
    This example shows how Zebra can be used with absolutely minimal
    configuration to index a body of
   <para>
    This example shows how Zebra can be used with absolutely minimal
    configuration to index a body of
-   <ulink url="http://www.w3.org/XML/">XML</ulink>
+   <ulink url="&url.xml;">XML</ulink>
    documents, and search them using
    documents, and search them using
-   <ulink url="http://www.w3.org/TR/xpath">XPath</ulink>
+   <ulink url="&url.xpath;">XPath</ulink>
    expressions to specify access points.
   </para>
   <para>
    expressions to specify access points.
   </para>
   <para>
   <para>
    Now we need to create a Zebra database to hold and index the XML
    records.  We do this with the
   <para>
    Now we need to create a Zebra database to hold and index the XML
    records.  We do this with the
-   Zebra indexer, <literal>zebraidx</literal>, which is
+   Zebra indexer, <command>zebraidx</command>, which is
    driven by the <literal>zebra.cfg</literal> configuration file.
    For our purposes, we don't need any
    special behaviour - we can use the defaults - so we can start with a
    driven by the <literal>zebra.cfg</literal> configuration file.
    For our purposes, we don't need any
    special behaviour - we can use the defaults - so we can start with a
-   minimal file that just tells <literal>zebraidx</literal> where to
+   minimal file that just tells <command>zebraidx</command> where to
    find the default indexing rules, and how to parse the records:
    <screen>
     profilePath: .:../../tab
    find the default indexing rules, and how to parse the records:
    <screen>
     profilePath: .:../../tab
    In the BIB-1 attribute set, a taxon name is probably best
    interpreted as a title - that is, a phrase that identifies the item
    in question.  BIB-1 represents title searches by
    In the BIB-1 attribute set, a taxon name is probably best
    interpreted as a title - that is, a phrase that identifies the item
    in question.  BIB-1 represents title searches by
-   access point 4.  (See
-   <ulink url="ftp://ftp.loc.gov/pub/z3950/defs/bib1.txt"
-       >The BIB-1 Attribute Set Semantics</ulink>)
+   access point 4.  (See 
+   <ulink url="&url.z39.50.bib1.semantics;">The BIB-1 Attribute
+    Set Semantics</ulink>)
    So we need to configure our dinosaur database so that searches for
    BIB-1 access point 4 look in the 
    <literal>&lt;termName&gt;</literal> element,
    So we need to configure our dinosaur database so that searches for
    BIB-1 access point 4 look in the 
    <literal>&lt;termName&gt;</literal> element,
index 758542b..67f3224 100644 (file)
@@ -1,5 +1,5 @@
  <chapter id="fields-and-charsets">
  <chapter id="fields-and-charsets">
-  <!-- $Id: field-structure.xml,v 1.2 2006-09-05 12:01:31 adam Exp $ -->
+  <!-- $Id: field-structure.xml,v 1.3 2006-09-22 12:34:45 adam Exp $ -->
   <title>Field Structure and Character Sets
   </title>
   
   <title>Field Structure and Character Sets
   </title>
   
        search containing space characters as a word proximity search.
        </para>
       </listitem></varlistentry>
        search containing space characters as a word proximity search.
        </para>
       </listitem></varlistentry>
+
+     <varlistentry id="default.idx.firstinfield">
+      <term>firstinfield <replaceable>boolean</replaceable></term>
+      <listitem>
+       <para>
+       This directive enables or disables first-in-field indexing.
+       The value of the <replaceable>boolean</replaceable> should be 0
+       (disable) or 1. 
+       </para>
+      </listitem></varlistentry>
+
+     <varlistentry id="default.idx.alwaysmatches">
+      <term>alwaysmatches <replaceable>boolean</replaceable></term>
+      <listitem>
+       <para>
+       This directive enables or disables alwaysmatches indexing.
+       The value of the <replaceable>boolean</replaceable> should be 0
+       (disable) or 1. 
+       </para>
+      </listitem></varlistentry>
+
      <varlistentry>
       <term>charmap <replaceable>filename</replaceable></term>
       <listitem>
      <varlistentry>
       <term>charmap <replaceable>filename</replaceable></term>
       <listitem>
index 0843dd1..9433231 100644 (file)
@@ -1,48 +1,47 @@
 <appendix id="indexdata">
 <appendix id="indexdata">
- <!-- $Id: indexdata.xml,v 1.9 2006-04-25 12:26:26 marc Exp $ -->
- <title>About Index Data and the Zebra Server</title>
- <para>
-  Index Data is a consulting and software-development enterprise that
-  specializes in library and information management systems. Our
-  interests and expertise span a broad range of related fields, and one
-  of our primary, long-term objectives is the development of a powerful
-  information management
-  system with open network interfaces and hyper-media capabilities.
- </para><para>
-  We make this software available free of charge, on a fairly unrestrictive
-  license; as a service to the networking community, and to further the
-  development of quality software for open network communication.
- </para><para>
-  We'll be happy to answer questions about the software, and about ourselves
-  in general.
- </para>
- <para>
-  <address>
-   Index Data ApS
-   <street>K&oslash;bmagergade 43, 2.</street>
-   <postcode>1150 Copenhagen K</postcode>
-   <country>Denmark</country>
-   Phone <phone>+45 3341 0100</phone>
-   Fax <fax>+45 3341 0101</fax>
-   Email <email>info@indexdata.dk</email>
-   <otheraddr>
-     <ulink url="http://indexdata.dk/">indexdata.dk</ulink></otheraddr>
-  </address>
- </para>
- <para>
-  The <emphasis>Random House College Dictionary</emphasis>, 1975 edition
-  offers this definition of the 
-  word "Zebra":
- </para>
- <para>
-  <citation>
+  <!-- $Id: indexdata.xml,v 1.10 2006-09-22 12:34:45 adam Exp $ -->
+  <title>About Index Data and the Zebra Server</title>
+  
+  <para>
+   Index Data is a consulting and software-development enterprise that
+   specializes in library and information management systems. Our
+   interests and expertise span a broad range of related fields, and one
+   of our primary, long-term objectives is the development of a powerful
+   information management
+   system with open network interfaces and hyper-media capabilities.
+  </para><para>
+   We make this software available free of charge, on a fairly unrestrictive
+   license; as a service to the networking community, and to further the
+   development of quality software for open network communication.
+  </para><para>
+   We'll be happy to answer questions about the software, and about ourselves
+   in general.
+  </para>
+  <para>
+   <address>
+    Index Data ApS
+    <street>K&oslash;bmagergade 43, 2.</street>
+    <postcode>1150</postcode> <city>Copenhagen K</city>
+    <country>Denmark</country>
+    Phone <phone>+45 3341 0100</phone>
+    Fax <fax>+45 3341 0101</fax>
+    Email <email>info@indexdata.dk</email>
+    <otheraddr>
+     <ulink url="&url.indexdata;"/>
+    </otheraddr>
+   </address>
+  </para>
+  <para>
+   The <emphasis>Random House College Dictionary</emphasis>, 1975 edition
+   offers this definition of the 
+   word "Zebra":
+  </para>
+  
+  <para>
    Zebra, n., any of several horselike, African mammals of the genus Equus,
    having a characteristic pattern of black or dark-brown stripes on
    a whitish background.
    Zebra, n., any of several horselike, African mammals of the genus Equus,
    having a characteristic pattern of black or dark-brown stripes on
    a whitish background.
-  </citation>
- </para>
+  </para>
 </appendix>
  <!-- Keep this comment at the end of the file
  Local variables:
 </appendix>
  <!-- Keep this comment at the end of the file
  Local variables:
index 7a41140..7492920 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Id: installation.xml,v 1.30 2006-09-15 09:21:52 adam Exp $ -->
+<!-- $Id: installation.xml,v 1.31 2006-09-22 12:34:45 adam Exp $ -->
  <chapter id="installation">
   <title>Installation</title>
   <para>
  <chapter id="installation">
   <title>Installation</title>
   <para>
@@ -15,7 +15,7 @@
    <ulink url="&url.suse;">SuSE Linux</ulink>,
    <ulink url="&url.freebsd;">FreeBSD (i386)</ulink>,
    <ulink url="&url.macosx;">MAC OSX</ulink>,
    <ulink url="&url.suse;">SuSE Linux</ulink>,
    <ulink url="&url.freebsd;">FreeBSD (i386)</ulink>,
    <ulink url="&url.macosx;">MAC OSX</ulink>,
-   <ulink url="&url.solaris;">SunOS 5.8
+   <ulink url="&url.solaris;">SunOS 5.9
     (sparc)</ulink>,
    <ulink url="&url.windows2000;">Windows 2000</ulink>.
   </para>
     (sparc)</ulink>,
    <ulink url="&url.windows2000;">Windows 2000</ulink>.
   </para>
@@ -91,8 +91,8 @@
       <para>
        These tools are only required if you're writing
        documentation for Zebra. You need the following
       <para>
        These tools are only required if you're writing
        documentation for Zebra. You need the following
-       Debian packages: jadetex, docbook, docbook-dsssl,
-       docbook-xml, docbook-utils.
+       Debian packages: docbook, docbook-xml, docbook-xsl,
+       docbook-utils, xsltproc.
       </para>
      </listitem>
     </varlistentry>
       </para>
      </listitem>
     </varlistentry>
   <section id="installation-win32"><title>WIN32</title>
    <para>The easiest way to install Zebra on Windows is by downloading
     an installer from 
   <section id="installation-win32"><title>WIN32</title>
    <para>The easiest way to install Zebra on Windows is by downloading
     an installer from 
-    <ulink url="http://ftp.indexdata.dk/pub/zebra/win32/">here</ulink>.
+    <ulink url="&url.idzebra.download.win32;">here</ulink>.
     The installer comes with source too - in case you wish to
     compile Zebra with different Compiler options.
    </para>
     The installer comes with source too - in case you wish to
     compile Zebra with different Compiler options.
    </para>
index 947b4a8..ae5df92 100644 (file)
@@ -1,5 +1,5 @@
 <chapter id="introduction">
 <chapter id="introduction">
- <!-- $Id: introduction.xml,v 1.39 2006-09-03 21:37:26 adam Exp $ -->
+ <!-- $Id: introduction.xml,v 1.40 2006-09-22 12:34:45 adam Exp $ -->
  <title>Introduction</title>
  
  <section id="overview">
  <title>Introduction</title>
  
  <section id="overview">
@@ -23,8 +23,8 @@
    programs and toolkits, both commercial and free, which understand
    this protocol.  Application libraries are available to allow
    bespoke clients to be written in Perl, C, C++, Java, Tcl, Visual
    programs and toolkits, both commercial and free, which understand
    this protocol.  Application libraries are available to allow
    bespoke clients to be written in Perl, C, C++, Java, Tcl, Visual
-   Basic, Python, PHP and more - see
-   <ulink url="http://zoom.z3950.org/">the ZOOM web site</ulink>
+   Basic, Python, PHP and more - see the
+   <ulink url="&url.zoom;">ZOOM web site</ulink>
    for more information on some of these client toolkits.
   </para>
 
    for more information on some of these client toolkits.
   </para>
 
     <listitem>
      <para>
       Zebra is written in portable C, so it runs on most Unix-like systems 
     <listitem>
      <para>
       Zebra is written in portable C, so it runs on most Unix-like systems 
-      as well as Windows NT.  A binary distribution for Windows NT is
-      available at
-      <ulink url="http://ftp.indexdata.dk/pub/zebra/win32/"/>,
+      as well as Windows (NT/2000/2003).  A binary distribution for Windows 
+      is available at
+      <ulink url="&url.idzebra.download.win32;"/>,
       and pre-built packages are available for 
       <!--- some Linux
       distributions:
       and pre-built packages are available for 
       <!--- some Linux
       distributions:
       and Debian packages at
       -->
       <literal>GNU/Debian Linux</literal> at 
       and Debian packages at
       -->
       <literal>GNU/Debian Linux</literal> at 
-      <ulink url="http://ftp.indexdata.dk/pub/zebra/debian/"/>.
+      <ulink url="&url.idzebra.download.debian;"/>.
      </para>
     </listitem>
     
      </para>
     </listitem>
     
        <literal>alvis</literal> filter module.
      </para>
     </listitem>
        <literal>alvis</literal> filter module.
      </para>
     </listitem>
-    <listitem>
-     <para>
-       Additional PQF query syntax for
-       <literal>searchRetrieve</literal>
-       and <literal>scan</literal> operations is supported.
+     <listitem>
+      <para>
+       Extended RPN queries for search/retrieve and scan are supported,
+       for controlling approximate hit counts, etc.
      </para>
      </para>
-    </listitem>
+     </listitem>
 
    </itemizedlist>
    
 
    </itemizedlist>
    
    </para>
   </section>
  </section>
    </para>
   </section>
  </section>
-
-
- <section id="introduction-support">
-  <title>Support</title>
-  <para>
-   You can get support for Zebra from at least three sources.
-  </para>
-  <para>
-   First, there's the Zebra web site at
-   <ulink url="http://indexdata.dk/zebra/"/>,
-   which always has the most recent version available for download.
-   If you have a problem with Zebra, the first thing to do is see
-   whether it's fixed in the current release.
-  </para>
-  <para>
-   Second, there's the Zebra mailing list.  Its home page at
-   <ulink url="http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist"/>
-   includes a complete archive of all messages that have ever been
-   posted on the list.  The Zebra mailing list is used both for
-   announcements from the authors (new
-   releases, bug fixes, etc.) and general discussion.  You are welcome
-   to seek support there.  Join by filling the form on the list home page.
-  </para>
-  <para>
-   Third, it's possible to buy a commercial support contract, with
-   well defined service levels and response times, from Index Data.
-   See
-   <ulink url="http://indexdata.dk/support/"/>
-   for details.
-  </para>
- </section>  
+  
+  
+  <section id="introduction-support">
+   <title>Support</title>
+   <para>
+    You can get support for Zebra from at least three sources.
+   </para>
+   <para>
+    First, there's the Zebra web site at
+    <ulink url="&url.idzebra;"/>,
+     which always has the most recent version available for download.
+     If you have a problem with Zebra, the first thing to do is see
+     whether it's fixed in the current release.
+   </para>
+   <para>
+    Second, there's the Zebra mailing list.  Its home page at
+    <ulink url="&url.idzebra.mailinglist;"/>
+     includes a complete archive of all messages that have ever been
+     posted on the list.  The Zebra mailing list is used both for
+     announcements from the authors (new
+     releases, bug fixes, etc.) and general discussion.  You are welcome
+     to seek support there.  Join by filling the form on the list home page.
+   </para>
+   <para>
+    Third, it's possible to buy a commercial support contract, with
+    well defined service levels and response times, from Index Data.
+    See
+    <ulink url="&url.indexdata.support;"/>
+     for details.
+   </para>
+  </section>  
 
 
  <section id="future">
 
 
  <section id="future">
        XSLT transformations during indexing and record retrieval. Work
        on this filter has been sponsored by the ALVIS EU project
        <ulink url="http://www.alvis.info/alvis/"/>. We expect this filter to
        XSLT transformations during indexing and record retrieval. Work
        on this filter has been sponsored by the ALVIS EU project
        <ulink url="http://www.alvis.info/alvis/"/>. We expect this filter to
-       mature soon, as it is planned to be included in the version 1.4
+       mature soon, as it is planned to be included in the version 2.0
        release of Zebra. 
      </para>
     </listitem>
 
     <listitem>
      <para>
        release of Zebra. 
      </para>
     </listitem>
 
     <listitem>
      <para>
-       Access to the search engine through SOAP/RPC API to allow the
-       construction of applications without requiring Z39.50 tools.
-       <!-- 
-      This will shortly be available by means of Index Data's
-        <ulink url="http://www.loc.gov/standards/sru/srw/">SRW</ulink>-to-Z39.50 gateway, currently in beta test.
-       -->
-       Experimental support of the 
-       Search/Retrieve Via URL ( <ulink url="&url.sru;">SRU</ulink>) 
-       <ulink url="&url.sru;"/>
-       REST webservice, and the 
-        Search/Retrieve Web Service ( <ulink url="http://www.loc.gov/standards/sru/srw/">SRW</ulink>)
-       <ulink url="http://www.loc.gov/standards/sru/srw/"/>
-       SOAP Web Service have recently been added to the YAZ/Zebra
-       combo - including server side Common Query Language (<ulink url="&url.cql;">CQL</ulink>)
-       <ulink url="&url.cql;"/> parsing
-       and configuration. It remains to find a sponsor for further testing,
-       documentation and packaging of this exiting component.
-     </para>
-    </listitem>
-
-    <listitem>
-     <para>
        Finalisation and documentation of Zebra's C programming
        API, allowing updates, database management and other functions
        not readily expressed in Z39.50.  We will also consider
        Finalisation and documentation of Zebra's C programming
        API, allowing updates, database management and other functions
        not readily expressed in Z39.50.  We will also consider
 
     <listitem>
      <para>
 
     <listitem>
      <para>
-       Support for the use of Perl both for access to the Zebra API
-       and for building extension ``plug-ins'' such as input filters.
-       The code for this has been contributed to the source tree by
-       Peter Popovics
-       <email>pop@technomat.hu</email>,
-       and is in the process of being integrated and tested.
-     </para>
-    </listitem>
-
-    <listitem>
-     <para>
        Improved free-text searching. We're first and foremost octet jockeys and
        we're actively looking for organisations or people who'd like
        to contribute experience in relevance ranking and text
        Improved free-text searching. We're first and foremost octet jockeys and
        we're actively looking for organisations or people who'd like
        to contribute experience in relevance ranking and text
index fae0454..6625d47 100644 (file)
@@ -1,5 +1,5 @@
 <appendix id="license">
 <appendix id="license">
- <!-- $Id: license.xml,v 1.12 2006-09-03 21:37:26 adam Exp $ -->
+ <!-- $Id: license.xml,v 1.13 2006-09-22 12:34:45 adam Exp $ -->
  <title>License</title>
 
   <para>
  <title>License</title>
 
   <para>
@@ -24,8 +24,8 @@
   <para>
    You should have received a copy of the GNU General Public License
    along with Zebra; see the file LICENSE.zebra.  If not, write to the
   <para>
    You should have received a copy of the GNU General Public License
    along with Zebra; see the file LICENSE.zebra.  If not, write to the
-   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.
+   Free Software Foundation, 
+   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    </para>
   
   <sect1 id="gpl">
    </para>
   
   <sect1 id="gpl">
@@ -36,7 +36,7 @@
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                        51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                        51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
+w Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
                            Preamble
  of this license document, but changing it is not allowed.
 
                            Preamble
index bbadb28..6c12214 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.26 2006-09-22 12:34:45 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
          <entry>default</entry>
         </row>
         <row>
          <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>
       <emphasis>Attributes-Plus-Terms (APT)</emphasis> queries.
      </para>
      <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
    <para>
     The Zebra internal query engine has been extended to specific needs
     not covered by the <literal>bib-1</literal> attribute set query
    <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>
       </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>
 
index d067622..564c7bf 100644 (file)
@@ -1,5 +1,5 @@
  <chapter id="record-model-alvisxslt">
  <chapter id="record-model-alvisxslt">
-  <!-- $Id: recordmodel-alvisxslt.xml,v 1.9 2006-09-03 21:37:27 adam Exp $ -->
+  <!-- $Id: recordmodel-alvisxslt.xml,v 1.10 2006-09-22 12:34:45 adam Exp $ -->
   <title>ALVIS XML Record Model and Filter Module</title>
   
 
   <title>ALVIS XML Record Model and Filter Module</title>
   
 
       ]]>
      </screen>
      See <xref linkend="zebrasrv-sru"/> for more information on SRU/SRW
       ]]>
      </screen>
      See <xref linkend="zebrasrv-sru"/> for more information on SRU/SRW
-     configuration, and <xref linkend="gfs-config"/> or 
-     <ulink url="http://www.indexdata.dk/yaz/doc/tools.tkl#tools.cql">
-      the YAZ manual CQL section</ulink>
-     for the details
-     of the YAZ frontend server 
-     <ulink url="&url.cql;">CQL</ulink>
-     configuration. 
+     configuration, and <xref linkend="gfs-config"/> or the YAZ
+     <ulink url="&url.yaz.cql;">CQL section</ulink>
+     for the details or the YAZ frontend server.
     </para>
     <para>
      Notice that there are no <filename>*.abs</filename>,
     </para>
     <para>
      Notice that there are no <filename>*.abs</filename>,