use new Context->Zconn object

This commit is contained in:
kados 2006-02-27 01:10:14 +00:00
parent ea3034363c
commit a3ff047944

View file

@ -235,14 +235,8 @@ sub catalogsearch {
# warn "$i : ".@$tags[$i]. "=> $tag / $subfield = ".$tagslib->{$tag}->{$subfield}->{kohafield}; # warn "$i : ".@$tags[$i]. "=> $tag / $subfield = ".$tagslib->{$tag}->{$subfield}->{kohafield};
} }
warn "QUERY : $query"; warn "QUERY : $query";
my $Zconn; my $Zconn = C4::Context->Zconn or die "unable to set Zconn";
eval {
$Zconn = new ZOOM::Connection(C4::Context->config("zebradb"));
};
$Zconn->option(cqlfile => C4::Context->config("intranetdir")."/zebra/pqf.properties");
$Zconn->option(preferredRecordSyntax => "xml");
my $q = new ZOOM::Query::CQL2RPN( $query, $Zconn); my $q = new ZOOM::Query::CQL2RPN( $query, $Zconn);
# warn "ERROR : ".$Zconn->errcode();
my $rs = $Zconn->search($q); my $rs = $Zconn->search($q);
my $numresults=$rs->size(); my $numresults=$rs->size();
if ($numresults eq 0) { if ($numresults eq 0) {