3 # Simple script (and config) to get pz2 to run against yaz-ztest, and
4 # calculate rankings. See how they differ for different queries
6 # (uses curl and xml-twig-tools)
11 rm -f $PIDFILE $YAZPIDFILE *.out *.log *~
20 YAZPIDFILE=yaz-ztest.pid
22 yaz-ztest -p $YAZPIDFILE -l yaz-ztest.log &
26 $PZ -f $CFG -l pz2.log -p $PIDFILE &
27 sleep 0.2 # make sure it has time to start
29 curl -s "http://localhost:9017/?command=init" > init.out
30 SESSION=`xml_grep --text_only "//session" init.out `
32 echo "Got session $SESSION"
33 SES="&session=$SESSION"
37 #SEARCH="command=search$SES&$QRY&rank=1&sort=relevance"
38 #SEARCH="command=search$SES&$QRY"
39 SEARCH="command=search$SES&$QRY&sort=relevance"
41 curl -s "http://localhost:9017/?$SEARCH" > search.out
42 cat search.out | grep search
45 SHOW="command=show$SES&sort=relevance"
47 curl -s "http://localhost:9017/?$SHOW" > show.out
48 grep "relevance" show.out | grep += | grep -v "(0)"
53 kill `cat $YAZPIDFILE`
54 rm -f $PIDFILE $YAZPIDFILE