b51c69b45c22eb8febe99c14b8afde81ac584a52
[irspy-moved-to-github.git] / zebra / README
1 $Id: README,v 1.14 2006-11-30 12:40:44 mike Exp $
2
3 What's what in this directory:
4
5 README -- This file
6
7 yazserver.xml -- The primary configuration file that controls how
8         Zebra runs (as a YAZ GFS application) in order to serve the
9         ZeeRex database.  This specifies where to find this database's
10         own ZeeRex record (zeerex.xml), the configuration for
11         translating CQL queries into Z39.50 Type-1 (pqf.properties),
12         and the Zebra-specific configuration (zebra.cfg).
13
14 zeerex.xml -- The static ZeeRex record for this database of ZeeRex
15         records.  It describes what a ZeeRex database looks like, and
16         how it behaves.  (Life would be better if Zebra could at least
17         partially work this out for itself, but for now we have to go
18         the long way round.)
19
20 zeerex-2.0.xsd -- The XML Schema describing ZeeRex records, as
21         downloaded from the official ZeeRex site at:
22                 http://explain.z3950.org/dtd/zeerex-2.0.xsd
23         Originally, this was used to validate both our own static
24         ZeeRex record and the records created by IRSpy, using:
25                 xmllint --noout --schema zeerex-2.0.xsd zeerex.xml
26         However, it can no longer be used for this purpose, as the
27         records now carry IRSpy-specific extensions that the schema
28         does not understand.  Eventually a new schema (most likely in
29         Relax NG Compact format) will be created for validation of the
30         extendd records.
31
32 pqf.properties -- The specification for how CQL queries are translated
33         into 39.50 Type-1 queries.  This file is identical to the one
34         supplied in the YAZ distribution: we'd just use that if there
35         was a reliable way to discover where it is.
36
37 ezeerex2pqfproperties.pl -- An in-progress script to automatically
38         generate the pqf.properties file from an extended ZeeRex
39         record.  Not yet in use.  A Makefile controls the use of this
40         script to generate "terse.properties", which may be, but is
41         not, used in place of "pqf.properties".
42
43 zebra.cfg -- Zebra-specific configuration, including the location of
44         the register files, the location of the XSLT filter
45         configuration (filterconf.xml), etc.
46
47 filterconf.xml -- Configuration of Zebra's XSLT filter, which uses
48         XSLT stylesheets to identify the indexable data in incoming
49         files and to transform records for presentation.
50
51 zeerex2index.xsl -- The indexing stylesheet for ZeeRex records.  It's
52         possible to check what indexer will see as follows:
53                 xsltproc zeerex2index.xsl zeerex.xml
54
55 zeerex2zeerex.xsl -- The "no-op" stylesheet for presenting ZeeRex
56         records.
57
58 zeerex2id.xsl -- A trivial stylesheet that just yields the record
59         identifier (not as an XML document).
60
61 profile -- Notes on the indexes in the ZeeRex profile, with
62         indications of whether they are yet supported by the Zebra
63         configuration in this directory.
64
65 records -- A subdirectory containing ZeeRex records to be added to the
66         database.  These were harvested from Index Data's existing
67         target-test database using
68                 scp -r bagel.indexdata.dk:/home/perhans/targettest/xml records
69         processed to add the missing namespace, and archived into a
70         single file records.tar.gz, which needs to be unpacked:
71                 tar xfz records.tar.gz
72
73 db -- A subdirectory containing the actual database: register files,
74         dictionaries and suchlike.
75
76 form.html -- a simple HTML search form that submits SRU queries to a
77         server running on local port 3313.
78
79 --
80
81 To create the database and start the server:
82
83 zebraidx-2.0 init # Remove any existing database records
84 zebraidx-2.0 update zeerex.xml # The single record describe this DB, or:
85 zebraidx-2.0 update records # The many records harvested from Index Data
86 zebraidx-2.0 commit
87 zebrasrv-2.0 -f yazserver.xml
88
89 To run all these commands, use:
90 sed -n '/^zebraidx/,+3p' README | while read line; do eval $line; done
91
92 Then interrogate the database with SRU URLs such as:
93         http://localhost:3313/IR-Explain---1?version=1.1&operation=searchRetrieve&maximumRecords=10&recordSchema=zeerex&query=net.protocol=sru
94