+ </section>
+
+
+ <section id="record-model-domxml-canonical-index-semantics">
+ <title>Semantics of the indexing formats</title>
+
+ <para>
+ Both indexing formats are defined with equal semantics and
+ behavior in mind:
+ <itemizedlist>
+ <listitem>
+ <para>&zebra; specific instructions are either
+ processing instructions named
+ <literal>zebra-2.0</literal> or
+ elements contained in the namespace
+ <literal>xmlns:z="http://indexdata.com/zebra-2.0"</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>There must be exactly one <literal>record</literal>
+ instruction, which sets the scope for the following,
+ possibly nested <literal>index</literal> instructions.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The unique <literal>record</literal> instruction
+ may have additional attributes <literal>id</literal>,
+ <literal>rank</literal> and <literal>type</literal>.
+ Attribute <literal>id</literal> is the value of the opaque ID
+ and may be any string not containing the whitespace character
+ <literal>' '</literal>.
+ The <literal>rank</literal> attribute value must be a
+ non-negative integer. See
+ <xref linkend="administration-ranking"/> .
+ The <literal>type</literal> attribute specifies how the record
+ is to be treated. The following values may be given for
+ <literal>type</literal>:
+ <variablelist>
+ <varlistentry>
+ <term><literal>insert</literal></term>
+ <listitem>
+ <para>
+ The record is inserted. If the record already exists, it is
+ skipped (i.e. not replaced).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>replace</literal></term>
+ <listitem>
+ <para>
+ The record is replaced. If the record does not already exist,
+ it is skipped (i.e. not inserted).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>delete</literal></term>
+ <listitem>
+ <para>
+ The record is deleted. If the record does not already exist,
+ it is skipped (i.e. nothing is deleted).
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>update</literal></term>
+ <listitem>
+ <para>
+ The record is inserted or replaced depending on whether the
+ record exists or not. This is the default behavior but may
+ be effectively changed by "outside" the scope of the DOM
+ filter by zebraidx commands or extended services updates.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ Note that the value of <literal>type</literal> is only used to
+ determine the action if and only if the Zebra indexer is running
+ in "update" mode (i.e zebraidx update) or if the specialUpdate
+ action of the
+ <link linkend="administration-extended-services-z3950">Extended
+ Service Update</link> is used.
+ For this reason a specialUpdate may end up deleting records!
+ </para>
+ </listitem>
+ <listitem>
+ <para> Multiple and possible nested <literal>index</literal>
+ instructions must contain at least one
+ <literal>indexname:indextype</literal>
+ pair, and may contain multiple such pairs separated by the
+ whitespace character <literal>' '</literal>. In each index
+ pair, the name and the type of the index is separated by a
+ colon character <literal>':'</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Any index name consisting of ASCII letters, and following the
+ standard &zebra; rules will do, see
+ <xref linkend="querymodel-pqf-apt-mapping-accesspoint"/>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Index types are restricted to the values defined in
+ the standard configuration
+ file <filename>default.idx</filename>, see
+ <xref linkend="querymodel-bib1"/> and
+ <xref linkend="fields-and-charsets"/> for details.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ &acro.dom; input documents which are not resulting in both one
+ unique valid
+ <literal>record</literal> instruction and one or more valid
+ <literal>index</literal> instructions can not be searched and
+ found. Therefore,
+ invalid document processing is aborted, and any content of
+ the <literal><extract></literal> and
+ <literal><store></literal> pipelines is discarted.
+ A warning is issued in the logs.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>The examples work as follows:
+ From the original &acro.xml; file
+ <literal>marc-one.xml</literal> (or from the &acro.xml; record &acro.dom; of the
+ same form coming from an <literal><input></literal>
+ pipeline),
+ the indexing
+ pipeline <literal><extract></literal>
+ produces an indexing &acro.xml; record, which is defined by
+ the <literal>record</literal> instruction