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)
10 CFG="$DIR/etc/heikki-test1.cfg"
15 YAZPIDFILE=$HDIR/yaz-ztest.pid
17 yaz-ztest -p $YAZPIDFILE -l yaz-ztest.log &
20 $PZ -f $CFG -w "$DIR/etc" -l $HDIR/pz2.log -p $PIDFILE &
21 sleep 0.2 # make sure it has time to start
23 curl -s "http://localhost:9017/?command=init" > init.out
24 SESSION=`xml_grep --text_only "//session" init.out `
26 echo "Got session $SESSION"
27 SES="&session=$SESSION"
31 #SEARCH="command=search$SES&$QRY&rank=1&sort=relevance"
32 #SEARCH="command=search$SES&$QRY"
33 SEARCH="command=search$SES&$QRY&sort=relevance"
35 curl -s "http://localhost:9017/?$SEARCH" > search.out
39 SHOW="command=show$SES&sort=relevance"
41 curl -s "http://localhost:9017/?$SHOW" > show.out
43 grep "md-score" show.out
45 grep "relevance" show.out
50 kill `cat $YAZPIDFILE`