use new Context->Zconn object
This commit is contained in:
parent
ea3034363c
commit
a3ff047944
1 changed files with 1 additions and 7 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue