1 # $Id: Explain.pm,v 1.7 2007-03-15 11:41:24 mike Exp $
3 # See the "Main" test package for documentation
5 package ZOOM::IRSpy::Test::Search::Explain;
11 use ZOOM::IRSpy::Test;
12 our @ISA = qw(ZOOM::IRSpy::Test);
18 my @explain = qw(CategoryList TargetInfo DatabaseInfo SchemaInfo TagSetInfo
19 RecordSyntaxInfo AttributeSetInfo TermListInfo
20 ExtendedServicesInfo AttributeDetails TermListDetails
21 ElementSetDetails RetrivalRecordDetails SortDetails
22 Processing VariantSetInfo UnitSet);
24 foreach my $category (@explain) {
25 $conn->irspy_search_pqf('@attr exp-1 1=1 ' . $category,
26 {'category' => $category},
27 { databaseName => 'IR-Explain-1' },
28 ZOOM::Event::ZEND, \&found,
29 exception => \&error);
35 my($conn, $task, $test_args, $event) = @_;
36 my $category = $test_args->{'category'};
38 my $n = $task->{rs}->size();
39 $task->{rs}->destroy();
41 $conn->log("irspy_test", "Explain category ", $category, " gave ", $n,
44 update($conn, $category, $ok);
46 return ZOOM::IRSpy::Status::TASK_DONE;
51 my($conn, $task, $test_args, $exception) = @_;
52 my $category = $test_args->{'category'};
54 $task->{rs}->destroy();
55 $conn->log("irspy_test", "Explain category lookup failed: ", $exception);
56 update($conn, $category, 0);
58 return ZOOM::IRSpy::Status::TEST_BAD
59 if ($exception->code() == 109 || # Database unavailable
60 $exception->code() == 235); # Database does not exist
62 return ZOOM::IRSpy::Status::TASK_DONE;
67 my ($conn, $category, $ok) = @_;
68 $conn->record()->store_result('explain', 'category' => $category,