2 # $Id: test3.sh,v 1.7 2005-01-03 12:08:04 adam Exp $
4 # Testing searches with lots of @and operators
5 # in order to test the fast-forward operation of rsets
14 echo "initializing..." >>$LOG
16 ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg init || exit 1
18 echo "updating..." >>$LOG
19 ../../index/zebraidx -l $LOG -c $pp/zebra1.cfg update $pp/records || exit 1
21 echo "starting server..." >>$LOG
22 ../../index/zebrasrv -D -p z.pid -S -c $pp/zebra1.cfg $DBG -l $LOG unix:socket
24 echo "checking it runs..." >>$LOG
25 test -f z.pid || exit 1
27 echo "search A1..." >>$LOG
28 ../api/testclient -c 17 unix:socket utah > log || exit 1
30 echo "search A2..." >>$LOG
31 ../api/testclient -c 30 unix:socket the > log || exit 1
33 echo "search A3..." >>$LOG
34 ../api/testclient -c 4 unix:socket deposits > log || exit 1
37 echo "search B1..." >>$LOG
38 ../api/testclient -c 7 unix:socket "@and utah the" > log || exit 1
40 echo "search B2..." >>$LOG
41 ../api/testclient -c 7 unix:socket "@and the utah" > log || exit 1
43 echo "search C1..." >>$LOG
44 ../api/testclient -c 1 unix:socket "@and @and the utah epicenter" > log || exit 1
46 echo "search C2..." >>$LOG
47 ../api/testclient -c 1 unix:socket "@and @and the epicenter utah" > log || exit 1
49 echo "search C3..." >>$LOG
50 ../api/testclient -c 1 unix:socket "@and @and utah the epicenter" > log || exit 1
52 echo "search C4..." >>$LOG
53 ../api/testclient -c 1 unix:socket "@and @and utah epicenter the" > log || exit 1
55 echo "search C5..." >>$LOG
56 ../api/testclient -c 1 unix:socket "@and @and epicenter the utah" > log || exit 1
58 echo "search C6..." >>$LOG
59 ../api/testclient -c 1 unix:socket "@and @and epicenter utah the" > log || exit 1
62 echo "search D1..." >>$LOG
63 ../api/testclient -c 29 unix:socket "@and the of " > log || exit 1
65 echo "search D2..." >>$LOG
66 ../api/testclient -c 29 unix:socket "@and of the" > log || exit 1
68 echo "search D3..." >>$LOG
69 ../api/testclient -c 29 unix:socket "@and @and the of of" > log || exit 1
71 echo "search D4..." >>$LOG
72 ../api/testclient -c 29 unix:socket "@and @and of the the" > log || exit 1
74 echo "search D5..." >>$LOG
75 ../api/testclient -c 29 unix:socket "@and @and @and the of of the" > log || exit 1
77 echo "search D6..." >>$LOG
78 ../api/testclient -c 15 unix:socket '@and @and in the data' > log || exit 1
80 echo "search D7..." >>$LOG
81 ../api/testclient -c 15 unix:socket '@and @and in data the' > log || exit 1
83 echo "search D8..." >>$LOG
84 ../api/testclient -c 2 unix:socket "@attr 1=4 @and UNPUBLISHED @and REPORTS AND" >log || exit 1
85 # This one failed at early fast-forwards
87 echo "search E1..." >>$LOG
88 ../api/testclient -c 40 unix:socket "@or the utah" > log || exit 1
90 echo "search E2..." >>$LOG
91 ../api/testclient -c 40 unix:socket "@or utah the" > log || exit 1
93 echo "search E3..." >>$LOG
94 ../api/testclient -c 42 unix:socket "@or deposits @or the utah" > log || exit 1
96 echo "search E4..." >>$LOG
97 ../api/testclient -c 2 unix:socket "@and deposits @or the utah" > log || exit 1
99 echo "search E5..." >>$LOG
100 ../api/testclient -c 2 unix:socket "@and @or the utah deposits" > log || exit 1
102 echo "search F1..." >>$LOG
103 ../api/testclient -c 23 unix:socket "@not the utah " > log || exit 1
105 echo "search F2..." >>$LOG
106 ../api/testclient -c 10 unix:socket "@not utah the " > log || exit 1
108 echo "search F3..." >>$LOG
109 ../api/testclient -c 1 unix:socket "@and deposits @not utah the " > log || exit 1
111 echo "search F4..." >>$LOG
112 ../api/testclient -c 1 unix:socket "@and @not utah the deposits" > log || exit 1
115 echo "stopping server..." >>$LOG
116 test -f z.pid || exit 1
117 kill `cat z.pid` || exit 1
121 echo "Test successfully completed" >>$LOG