1 echo "testing without stored keys (zebra1.cfg)"
5 rm -f records/esdd000[12].grs # these should not be here, will be created later
7 ../../index/zebraidx -l idx.log -c zebra1.cfg init || exit 1
10 ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
12 echo "killing old server (if any)..."
13 test -f zebrasrv.pid && kill -9 `cat zebrasrv.pid`
17 echo "starting server..."
18 ../../index/zebrasrv -S -c zebra1.cfg -l srv.log tcp:@:9901 &
21 echo "checking it runs..."
22 test -f zebrasrv.pid || exit 1
25 ../testclient localhost:9901 utah > log || exit 1
26 grep "^Result count: 17$" log || exit 1
29 ../testclient localhost:9901 "@or utah the" > log || exit 1
30 grep "^Result count: 40$" log || exit 1
33 ../testclient localhost:9901 "@attr 1=4 the" > log || exit 1
34 grep "^Result count: 1$" log || exit 1
37 ../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
38 grep "^Result count: 9$" log || exit 1
41 ../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
44 ../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
45 grep "^Result count: 18$" log || exit 1
47 echo "stopping server..."
48 test -f zebrasrv.pid || exit 1
49 kill -9 `cat zebrasrv.pid` || exit 1