X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=ztest.pl;h=d5c59a666bf2226ea5837143fdea89b4ebbfa4bc;hp=10ca66766b03305a40f9a09346bd962afc564e6a;hb=HEAD;hpb=0d2c0f1cdeaec0675cbd0d2463858ecf834effec diff --git a/ztest.pl b/ztest.pl index 10ca667..d5c59a6 100755 --- a/ztest.pl +++ b/ztest.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ## This file is part of simpleserver -## Copyright (C) 2000-2013 Index Data. +## Copyright (C) 2000-2015 Index Data. ## All rights reserved. ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: @@ -70,6 +70,7 @@ sub my_scan_handler { my $term = $args->{TERM}; my $entries = [ { TERM => 'Number 1', + DISPLAY_TERM => 'Number .1', OCCURRENCE => 10 }, { TERM => 'Number 2', OCCURRENCE => 8 }, @@ -94,6 +95,7 @@ sub my_scan_handler { $args->{ENTRIES} = $entries; $args->{STATUS} = Net::Z3950::SimpleServer::ScanPartial; print "Welcome to scan....\n"; + $args->{EXTRA_RESPONSE_DATA} = 'b'; print "You scanned for term '$term'\n"; } @@ -132,10 +134,13 @@ sub my_search_handler { print "Setname : $set_id\n"; print " inputfacets:\n"; print Dumper($facets); + print " extra args:\n"; + print Dumper($args->{EXTRA_ARGS}); print "------------------------------------------------------------\n"; $args->{OUTPUTFACETS} = $facets; + $args->{EXTRA_RESPONSE_DATA} = 'b'; $args->{HITS} = $hits; $session->{$set_id} = $data; $session->{__HITS} = $hits;