-SUBDIRS=codec api gils malxml config usmarc dmoz xpath sort xelm cddb \
+SUBDIRS=codec api gils malxml config usmarc dmoz xpath sort sort2 xelm cddb \
rusmarc zsh marcxml charmap
--- /dev/null
+# $Id: Makefile.am,v 1.1 2004-09-14 14:35:52 quinn Exp $
+
+check_SCRIPTS = test1.sh
+
+TESTS = $(check_SCRIPTS)
+
+EXTRA_DIST = zebra.cfg default.idx string-hat.chr \
+ rec1.xml rec2.xml rec3.xml rec4.xml zebra.cfg my.abs sort.chr \
+ $(check_SCRIPTS)
+
--- /dev/null
+# Zebra indexes as referred to from the *.abs-files.
+# $Id: default.idx,v 1.1 2004-09-14 14:35:52 quinn Exp $
+#
+
+# Traditional word index
+# Used if completenss is 'incomplete field' (@attr 6=1) and
+# structure is word/phrase/word-list/free-form-text/document-text
+index w
+completeness 0
+position 1
+charmap sort.chr
+
+# Phrase index
+# Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
+# and structure is word/phrase/word-list/free-form-text/document-text
+index p
+completeness 1
+charmap sort.chr
+
+# URX (URL) index
+# Used if structure=urx (@attr 4=104)
+index u
+completeness 0
+charmap urx.chr
+
+# Numeric index
+# Used if structure=numeric (@attr 4=109)
+index n
+completeness 0
+charmap numeric.chr
+
+# Null map index (no mapping at all)
+# Used if structure=key (@attr 4=3)
+index 0
+completeness 0
+position 1
+charmap @
+
+# Year
+# Used if structure=year (@attr 4=4)
+index y
+completeness 0
+charmap @
+
+# Date
+# Used if structure=date (@attr 4=5)
+index d
+completeness 0
+charmap @
+
+# Sort, with prefixes to ignore
+sort s
+completeness 1
+charmap sort.chr
+
--- /dev/null
+# $Id: my.abs,v 1.1 2004-09-14 14:35:52 quinn Exp $
+
+name my
+reference WAIS-schema
+attset bib1.att
+tagset generic.tag
+xpath enable
+
+varset var1.var
+
+esetname B @
+esetname F @
+
+elm title Title !:p,!:w,!:s
--- /dev/null
+<my>
+ <title>first computer</title>
+</my>
--- /dev/null
+<my>
+ <title>second computer</title>
+</my>
--- /dev/null
+<my>
+ <title>A third computer</title>
+</my>
--- /dev/null
+<my>
+ <title>the fourth computer</title>
+</my>
--- /dev/null
+# Generic character map.
+#
+# $Id: sort.chr,v 1.1 2004-09-14 14:35:52 quinn Exp $
+
+# Define the basic value-set. *Beware* of changing this without re-indexing
+# your databases.
+
+lowercase {0-9}{a-y}üzæäøöå
+uppercase {0-9}{A-Y}ÜZÆÄØÖÅ
+
+# Breaking characters
+
+space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]^_`\{|}~
+
+# Characters to be considered equivalent for searching purposes.
+
+# equivalent æä(ae)
+# equivalent øö(oe)
+# equivalent å(aa)
+# equivalent uü
+
+map (^The\s) @
+map (^the\s) @
+map (^a\s) @
+map (^A\s) @
+
+#map éÉ e
+#map á a
+#map ó o
+#map í i
+
+#map (Aa) (AA)
+
+#map (aa) a
--- /dev/null
+# Generic character map but with ^ as cut char
+#
+# $Id: string-hat.chr,v 1.1 2004-09-14 14:35:52 quinn Exp $
+
+# Define the basic value-set. *Beware* of changing this without re-indexing
+# your databases.
+
+lowercase {0-9}{a-y}üzæäøöå
+uppercase {0-9}{A-Y}ÜZÆÄØÖÅ
+
+cut ^
+
+# Breaking characters
+
+space {\001-\040}!"#$%&'\()*+,-./:;<=>?@\[\\]_`\{|}~
+
+# Characters to be considered equivalent for searching purposes.
+
+# equivalent æä(ae)
+# equivalent øö(oe)
+# equivalent å(aa)
+# equivalent uü
+
+# Supplemental mappings
+
+#map (ä) ä
+#map (æ) æ
+#map (ø) ø
+#map (å) å
+#map (ö) ö
+#map (Ä) Ä
+#map (&Aelig;) Æ
+#map (Ø) Ø
+#map (Å) Å
+#map (Ö) Ö
+
+#map éÉ e
+#map á a
+#map ó o
+#map í i
+
+#map (Aa) (AA)
+
+#map (aa) a
--- /dev/null
+#!/bin/sh
+# $Id: test1.sh,v 1.1 2004-09-14 14:35:52 quinn Exp $
+
+pp=${srcdir:-"."}
+
+ulimit -c 10000
+LOG=test1.log
+rm -f $LOG
+rm -fr lock
+mkdir lock
+rm -fr reg
+mkdir reg
+rm -fr recs
+mkdir recs
+cp $pp/rec*.xml recs
+../../index/zebraidx -c $pp/zebra.cfg -l $LOG update recs || exit 1
+../../index/zebrasrv -c $pp/zebra.cfg -l $LOG unix:socket &
+sleep 1
+test -f lock/zebrasrv.pid || exit 2
+../api/testclient -n4 unix:socket '@or computer @attr 7=1 @attr 1=4 0' >tmp1
+
+kill `cat lock/zebrasrv.pid`
+
+echo 'Result count: 4
+my:
+ title: first computer
+my:
+ title: the fourth computer
+my:
+ title: second computer
+my:
+ title: A third computer' >tmp2
+
+diff tmp1 tmp2
--- /dev/null
+# Simple Zebra configuration file
+# $Id: zebra.cfg,v 1.1 2004-09-14 14:35:52 quinn Exp $
+#
+# Where the schema files, attribute files, etc are located.
+profilePath: ${srcdir:-.}:${srcdir:-.}/../../tab
+
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+
+recordtype.xml: grs.sgml
+lockdir: lock
+register: reg:20M
+isam: b