additional information on zebra functionalities and attribute lists added
authorMarc Cromme <marc@indexdata.dk>
Thu, 15 Jun 2006 13:41:49 +0000 (13:41 +0000)
committerMarc Cromme <marc@indexdata.dk>
Thu, 15 Jun 2006 13:41:49 +0000 (13:41 +0000)
doc/querymodel.xml

index f1a7964..bed7a2e 100644 (file)
@@ -1,5 +1,5 @@
  <chapter id="querymodel">
-  <!-- $Id: querymodel.xml,v 1.5 2006-06-14 13:57:45 marc Exp $ -->
+  <!-- $Id: querymodel.xml,v 1.6 2006-06-15 13:41:49 marc Exp $ -->
   <title>Query Model</title>
   
   <sect1 id="querymodel-overview">
     
     
    <sect3 id="querymodel-bib1-use">
-     <title>Use Attributes (type = 1)</title>
+     <title>Use Attributes (type 1)</title>
     </sect3>
 
     <para>
+     A use attribute specifies an access point for any atomic query.
+     These acess points are highly dependent on the attribute set used
+     in the query, and are user configurable using the following
+     default configuration files:
+     <filename>tab/bib1.att</filename>,
+     <filename>tab/dan1.att</filename>,
+     <filename>tab/explain.att</filename>, and
+     <filename>tab/gils.att</filename>.
+     New attribute sets can be added by adding new 
+     <filename>tab/*.att</filename> configuration files, which need to
+     be sourced in the main configuration <filename>zebra.cfg</filename>.
+     </para>
+
+    <para>
+     In addition, Zebra allows the acess of 
+     <emphasis>internal index names</emphasis> and <emphasis>dynamic
+     XPath</emphasis> as use attributes. 
+     See  <xref linkend="querymodel-use-string and  "/>
+     <xref linkend="querymodel-use-xpath"/> for
+     alternative acess to the Zebra internal index names and XPath queries.
+    </para> 
+
+    <para>
      Phrase search for <emphasis>information retrieval</emphasis> in
      the title-register:
      <screen>
      </screen>
     </para>
 
-    <para>
-     See also <xref linkend="querymodel-use-string and  "/>
-     <xref linkend="querymodel-use-xpath"/> for
-     alternative acess to the Zebra internal index names and XPath queries.
-    </para> 
-
     
     <sect3 id="querymodel-bib1-relation">
-     <title>Relation Attributes (type = 2)</title>
-       <para>
-     Supported operations: = (default, of omitted), &lt; &gt; &lt;=, &gt;= .
-     Unsupported: Not equal.
+     <title>Relation Attributes (type 2)</title>
      
-     The following relation attributes are also supported: relevance (102).
-     <!-- always-matches (103) not supported for all indexes -->
+     <para>
+      Relation attributes describe the relationship of the access
+      point (left side 
+      of the relation) to the search term as qualified by the attributes (right
+      side of the relation), e.g., Date-publication &lt;= 1975.
+      </para>
 
-     All operations are based on a lexicographical ordering, 
-     <emphasis>expect</emphasis> in the case for the
-     following structure attributes: numeric(109). 
-    </para>
+     <table id="querymodel-bib1-relation-table">
+      <caption>Relation Attributes (type 2)</caption>
+      <thead>
+        <tr>
+         <td>Relation</td>
+         <td>Value</td>
+         <td>Notes</td>
+        </tr>
+       </thead>
+       <tbody>
+        <tr>
+         <td> Less than</td>
+         <td>1</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Less than or equal</td>
+         <td>2</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Equal</td>
+         <td>3</td>
+         <td>default</td>
+        </tr>
+        <tr>
+         <td>Greater or equal</td>
+         <td>4</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Greater than</td>
+         <td>5</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Not equal</td>
+         <td>6</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Phonetic</td>
+         <td>100</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Stem</td>
+         <td>101</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Relevance</td>
+         <td>102</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>AlwaysMatches</td>
+         <td>103</td>
+         <td>supported</td>
+        </tr>
+       </tbody>
+     </table>
 
+     <para>
+      The relation attribute 
+      <literal>relevance (102)</literal> is supported, see
+      <xref linkend="administration-ranking"/> for full information.
+      <!-- always-matches (103) not supported for all indexes -->
+     </para>
+     
     <para>
+     All ordering operations are based on a lexicographical ordering, 
+     <emphasis>expect</emphasis> when the 
+     structure attribute <literal>numeric (109)</literal> is used. In
+     this case, ordering is numerical. See 
+      <xref linkend="querymodel-bib1-structure"/>.
+    </para>
+
+     <para>
      Ranked search for <emphasis>information retrieval</emphasis> in
      the title-register
      (see <xref linkend="administration-ranking"/> for the glory details):
     </sect3>
 
     <sect3 id="querymodel-bib1-position">
-     <title>Position Attributes (type = 3)</title>
+     <title>Position Attributes (type 3)</title>
      <para>
-      Only value of (any position(3) is supported. first in field(1),
-      and first in subfield(2) are unsupported but using them
-      does not trigger an error.
+      The position attribute specifies the location of the search term
+      within the field or subfield in which it appears.
+     </para>
+
+     <table id="querymodel-bib1-position-table">
+      <caption>Position Attributes (type 3)</caption>
+      <thead>
+        <tr>
+         <td>Position</td>
+         <td>Value</td>
+         <td>Notes</td>
+        </tr>
+       </thead>
+       <tbody>
+        <tr>
+         <td>First in field </td>
+         <td>1</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>First in subfield</td>
+         <td>2</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Any position in field</td>
+         <td>3</td>
+         <td>default</td>
+        </tr>
+       </tbody>
+     </table>
+    <para>
+      The position attribute values <literal>first in field (1)</literal>,
+      and <literal>first in subfield(2)</literal> are unsupported.
+      Using them does not trigger an error, but silent defaults to 
+      <literal>any position in field (3)</literal>.
       <!-- It should -->
       </para>
     </sect3>
     
     <sect3 id="querymodel-bib1-structure">
-     <title>Structure Attributes (type = 4)</title>
-     <!-- See tab/default.idx -->
+     <title>Structure Attributes (type 4)</title>
+   
+     <para>
+      The structure attribute specifies the type of search
+      term. This causes the search to be mapped on
+      different Zebra internal indexes, which must have been defined
+      at index time. 
+     </para>
+
+     <para> 
+      The possible values of the  
+      <literal>structure attribute (type 4)</literal> can be defined
+      using the configuraiton file <filename>
+      tab/default.idx</filename>.
+      The default configuration is summerized in this table.
+     </para>
+
+     <table id="querymodel-bib1-structure-table">
+      <caption>Structure Attributes (type 4)</caption>
+      <thead>
+        <tr>
+         <td>Structure</td>
+         <td>Value</td>
+         <td>Notes</td>
+        </tr>
+       </thead>
+       <tbody>
+        <tr>
+         <td>Phrase </td>
+         <td>1</td>
+         <td>default</td>
+        </tr>
+        <tr>
+         <td>Word</td>
+         <td>2</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Key</td>
+         <td>3</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Year</td>
+         <td>4</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Date (normalized)</td>
+         <td>5</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Word list</td>
+         <td>6</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Date (un-normalized)</td>
+         <td>100</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Name (normalized) </td>
+         <td>101</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Name (un-normalized) </td>
+         <td>102</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Structure</td>
+         <td>103</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Urx</td>
+         <td>104</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Free-form-text</td>
+         <td>105</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Document-text</td>
+         <td>106</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Local-number</td>
+         <td>107</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>String</td>
+         <td>108</td>
+         <td>unsupported</td>
+        </tr>
+        <tr>
+         <td>Numeric string</td>
+         <td>109</td>
+         <td>supported</td>
+        </tr>
+       </tbody>
+     </table>
     </sect3>
     
     <para>
+     The structure attribute value <literal>local-number
+      (107)</literal>
+     is supported, and maps always to the Zebra internal document ID.
+     </para>
+
+    <para>
      For example, in
      the GILS schema (<literal>gils.abs</literal>), the
      west-bounding-coordinate is indexed as type <literal>n</literal>,
 
     <sect3 id="querymodel-bib1-truncation">
      <title>Truncation Attributes (type = 5)</title>
+
      <para>
-      Supported are: No truncation(100) which is the default,
-      Right trunation(1), Left truncation(2),
-      Left&amp;Right truncation(3), 
-      Process <literal>#</literal> in term(100) which maps
-      each # to <literal>.*</literal>,
-      Regexp-1(102) normal regular, Regexp-2(103) (regular with fuzzy),
+      The truncation attribute specifies whether variations of one or
+      more characters are allowed between serch term and hit terms, or
+      not. Using non-default truncation attributes will broaden the
+      document hit set of a search query.
+     </para>
+
+     <table id="querymodel-bib1-truncation-table">
+      <caption>Truncation Attributes (type 5)</caption>
+      <thead>
+        <tr>
+         <td>Truncation</td>
+         <td>Value</td>
+         <td>Notes</td>
+        </tr>
+       </thead>
+       <tbody>
+        <tr>
+         <td>Right truncation </td>
+         <td>1</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Left truncation</td>
+         <td>2</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Left and right truncation</td>
+         <td>3</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>Do not truncate</td>
+         <td>100</td>
+         <td>default</td>
+        </tr>
+        <tr>
+         <td>Process # in search term</td>
+         <td>101</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>RegExpr-1 </td>
+         <td>102</td>
+         <td>supported</td>
+        </tr>
+        <tr>
+         <td>RegExpr-2</td>
+         <td>103</td>
+         <td>supported</td>
+        </tr>
+       </tbody>
+     </table>
+
+     <para>
+      Truncation attribute value 
+      <literal>Process # in search term (100)</literal> is a
+      poor-man's regular expression search. It maps
+      each <literal>#</literal> to <literal>.*</literal>, and
+      performes then a <literal>Regexp-1 (102)</literal> regular
+      expression search.
+     </para>
+     <para>
+      Truncation attribute value 
+       <literal>Regexp-1 (102)</literal> is a normal regular search,
+      see.
+     </para>
+     <para>
+       Truncation attribute value 
+      <literal>Regexp-2 (103) </literal> is a Zebra specific extention
+      which allows <emphasis>fuzzy</emphasis> matches. One single
+      error in spelling of search terms is allowed, i.e., a document
+      is hit if it includes a term which can be mapped to the used
+      search term by one character substitution, addition, deletion or
+      change of posiiton. 
+      </para>  
       <!--
       Special 104, 105, 106 are deprecated and will be removed! -->
-      </para>  
     </sect3>
     
     <sect3 id="querymodel-bib1-completeness">
       <caption>Zebra Search Attribute Extentions</caption>
        <thead>
         <tr>
-         <td><emphasis>Name and Type</emphasis></td>
+         <td>Name</td>
+         <td>Value</td>
          <td>Operation</td>
          <td>Zebra version</td>
         </tr>
       </thead>
        <tbody>
         <tr>
-         <td><emphasis>Embedded Sort (type 7)</emphasis></td>
+         <td>Embedded Sort</td>
+         <td>7</td>
          <td>search</td>
          <td>1.1</td>
         </tr>
         <tr>
-         <td><emphasis>Term Set (type 8)</emphasis></td>
+         <td>Term Set</td>
+         <td>8</td>
          <td>search</td>
          <td>1.1</td>
         </tr>
         <tr>
-         <td><emphasis>Rank weight  (type 9)</emphasis></td>
+         <td>Rank Weight</td>
+         <td>9</td>
          <td>search</td>
          <td>1.1</td>
         </tr>
         <tr>
-         <td><emphasis>Approx Limit (type 9)</emphasis></td>
+         <td>Approx Limit</td>
+         <td>9</td>
          <td>search</td>
          <td>1.4</td>
         </tr>
         <tr>
-         <td><emphasis>Term Reference (type 10)</emphasis></td>
+         <td>Term Reference</td>
+         <td>10</td>
          <td>search</td>
          <td>1.4</td>
         </tr>