mixed in enumerable to result set class. added result set method to get the size...
[zcc.git] / website / zebra.txt
blobd489426295112ae5c061db15c9ef2e4972d5126c
1 h1. Very simple setup of local zebra server
3 These instructions are probably incomplete for this release. Please let me know if you find errors.
5 Install all the dependencies to zcc and confirm that it is working.
7 Install "zebra":http://www.indexdata.dk/zebra/ If using Debian or RedHat it is suggested that you add the indexdata repositories.
9 You may have alread done these steps:
10 <pre syntax="ruby">
11 $ cd ~/.zcc
12 $ cp -r /var/lib/gems/1.8/gems/zcc-0.0.3/examples/zebra .
13 </pre>
15 Now do these:
16 <pre syntax="ruby>
17 $ cd zebra
18 $ zebraidx update records
19 </pre>
21 If the initial record update goes off without warnings or errors try this to start up the server in daemon mode (silent mode that runs in the background).
23 <pre syntax="ruby">
24 $ zebrasrv -D
25 </pre>
27 You should see loaded filter module messages and then be returned to a prompt:
29 <pre syntax="ruby">
30 $ yaz-client localhost:9999/zcc
31 Z> f computer
32 Z> show 1
33 Sent presentRequest (1+1).
34 Records: 1
35 [zcc]Record type: USmarc
36 00362nam  22001698a 4500
37 001    11224466
38 003 DLC
39 005 00000000000000.0
40 008 910710c19910701nju           00010 eng
41 010    $a DLC $c DLC
42 040 00 $a 123-xyz
43 050 10 $a Jack Collins
44 100 10 $a How to program a computer
45 245 1  $a Penguin
46 260    $a 8710
47 263    $a p. cm.
48 300    $a 11224466
49 </pre>
51 If you see a record displayed then it works! Congratulations.
53 Now you can configure your local zserver in the zcc.yaml file in ~/.zcc. Add (or uncomment) this line if necessary:
54 <pre>- [localhost,    9999,     zcc]</pre>
55 My suggestion is to add that to the top of your zservers to check in see whether you already have an appropriate record.
57 When you want to add records to the zebra database manually you will need to return to your ~/.zcc/zebra directory and reindex the whole bunk of records. Just drop a UTF-8 encoded MARC record (IS02709) anywhere in the directory below ~/.zcc/zebra/records and it will be indexed after running this:
59 <pre syntax="ruby">$ cd ~/.zcc/zebra
60 $ zebraidx update records</pre>
62 To make this the default place to save records choose 'zebra' under save_record_syntax in zcc.yaml. This reindexing could take some time, especially if you have a large number of files, though zebra does index quickly. Right now the database is reindexed after each insertion of a record. Not optimal and I'm looking at other ways to do this (only reindex on quit?) We would like to add extended services for record insert and update to "ruby-zoom":http://ruby-zoom.rubyforge.org/ Currently the C-binding is incomplete. Please let me know if you're a developer willing to do the work (jronallo+zoom@gmail.com).
64 If you shutdown your computer make sure to restart the zebrasrv!
66 If port 9999, the default zebrasrv port, is exposed to the world, others may be able to search your database as well.  You may find this a good thing :) or it may be a security risk? You can specify a different port on the command line. See the "zebra docs":http://www.indexdata.dk/zebra/doc/ for more information on changing the port and other configuration options for zebra. What you have been presented with here is just the simplest quickest way of getting I've found for getting zebra for zcc up and running on my Debian systems.