File: tutorial.html

package info (click to toggle)
idzebra 2.2.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,572 kB
  • sloc: ansic: 54,389; xml: 27,058; sh: 5,892; makefile: 1,102; perl: 210; tcl: 64
file content (70 lines) | stat: -rw-r--r-- 6,726 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter3.Tutorial</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Zebra - User's Guide and Reference"><link rel="up" href="index.html" title="Zebra - User's Guide and Reference"><link rel="prev" href="installation-upgrade.html" title="4.Upgrading from Zebra version 1.3.x"><link rel="next" href="tutorial-oai-sru-pqf.html" title="2.Searching the OAI database by web service"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter3.Tutorial</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation-upgrade.html">Prev</a></td><th width="60%" align="center"></th><td width="20%" align="right"><a accesskey="n" href="tutorial-oai-sru-pqf.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="tutorial"></a>Chapter3.Tutorial</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="tutorial.html#tutorial-oai">1. A first <acronym class="acronym">OAI</acronym> indexing example</a></span></dt><dt><span class="sect1"><a href="tutorial-oai-sru-pqf.html">2. Searching the <acronym class="acronym">OAI</acronym> database by web service</a></span></dt><dt><span class="sect1"><a href="tutorial-oai-sru-present.html">3. Presenting search results in different formats</a></span></dt><dt><span class="sect1"><a href="tutorial-oai-sru-searches.html">4. More interesting searches</a></span></dt><dt><span class="sect1"><a href="tutorial-oai-sru-zebra-indexes.html">5. Investigating the content of the indexes</a></span></dt><dt><span class="sect1"><a href="tutorial-oai-sru-yazfrontend.html">6. Setting up a correct <acronym class="acronym">SRU</acronym> web service</a></span></dt><dt><span class="sect1"><a href="tutorial-oai-z3950.html">7. Searching the <acronym class="acronym">OAI</acronym> database by <acronym class="acronym">Z39.50</acronym> protocol</a></span></dt></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-oai"></a>1.A first <acronym class="acronym">OAI</acronym> indexing example</h2></div></div></div><p>
    In this section, we will test the system by indexing a small set of
    sample <acronym class="acronym">OAI</acronym> records that are included with the <span class="application">Zebra</span> distribution,
    running a <span class="application">Zebra</span> server against the newly created database, and
    searching the indexes with a client that connects to that server.
   </p><p>
    Go to the <code class="literal">examples/oai-pmh</code> subdirectory of the
    distribution archive, or make a deep copy of the Debian installation
    directory
    <code class="literal">/usr/share/idzebra-2.0-examples/oai-pmh</code>.
    An XML file containing multiple <acronym class="acronym">OAI</acronym>
    records is located in the  sub
    directory <code class="literal">examples/oai-pmh/data</code>.
   </p><p>
    Additional OAI test records can be downloaded by running a shell
    script (you may want to abort the script when you have waited
    longer than your coffee brews ..).
    </p><pre class="screen">
     cd data
     ./fetch_OAI_data.sh
     cd ../
    </pre><p>
   </p><p>
    To index these <acronym class="acronym">OAI</acronym> records, type:
    </p><pre class="screen">
     zebraidx-2.0 -c conf/zebra.cfg init
     zebraidx-2.0 -c conf/zebra.cfg update data
     zebraidx-2.0 -c conf/zebra.cfg commit
    </pre><p>
    In case you have not installed zebra yet but have compiled the
    binaries from this tarball, use the following command form:
    </p><pre class="screen">
     ../../index/zebraidx -c conf/zebra.cfg this and that
    </pre><p>
    On some systems the <span class="application">Zebra</span> binaries are installed under the
    generic names, you need to use  the following command form:
    </p><pre class="screen">
     zebraidx -c conf/zebra.cfg this and that
    </pre><p>
   </p><p>
    In this command, the word <code class="literal">update</code> is followed
    by the name of a directory: <code class="literal">zebraidx</code> updates all
    files in the hierarchy rooted at <code class="literal">data</code>.
    The command option
    <code class="literal">-c conf/zebra.cfg</code> points to the proper
    configuration file.
   </p><p>
    You might ask yourself how <acronym class="acronym">XML</acronym> content is indexed using <acronym class="acronym">XSLT</acronym>
    stylesheets: to satisfy your curiosity, you might want to run the
    indexing transformation on an example debugging <acronym class="acronym">OAI</acronym> record.
    </p><pre class="screen">
     xsltproc conf/oai2index.xsl data/debug-record.xml
    </pre><p>
    Here you see the <acronym class="acronym">OAI</acronym> record transformed into the indexing
    <acronym class="acronym">XML</acronym> format. <span class="application">Zebra</span> is creating several inverted indexes,
    and their name and type are clearly visible in the indexing
    <acronym class="acronym">XML</acronym> format.
   </p><p>
    If your indexing command was successful, you are now ready to
    fire up a server. To start a server on port 9999, type:
    </p><pre class="screen">
     zebrasrv-2.0 -c conf/zebra.cfg  @:9999
    </pre><p>
   </p><p>
    The <span class="application">Zebra</span> index that you have just created has a single database
    named <code class="literal">Default</code>.
    The database contains  several <acronym class="acronym">OAI</acronym> records, and the server will
    return records in the <acronym class="acronym">XML</acronym> format only. The indexing machine
    did the splitting into individual records just behind the scenes.
   </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation-upgrade.html">Prev</a></td><td width="20%" align="center"></td><td width="40%" align="right"><a accesskey="n" href="tutorial-oai-sru-pqf.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.Upgrading from <span class="application">Zebra</span> version 1.3.x</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">2.Searching the <acronym class="acronym">OAI</acronym> database by web service</td></tr></table></div></body></html>