[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Search.pm
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/C4 Search.pm |
Date: |
Thu, 26 Jul 2007 15:17:46 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: Antoine Farnault <toins> 07/07/26 15:17:46
Modified files:
C4 : Search.pm
Log message:
adding 'kw' to search on keyword on non zebra mod
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&r1=1.151&r2=1.152
Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -b -r1.151 -r1.152
--- Search.pm 16 Jul 2007 15:44:31 -0000 1.151
+++ Search.pm 26 Jul 2007 15:17:46 -0000 1.152
@@ -25,7 +25,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.151 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.152 $' =~ /\d+/g;
shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
};
@@ -1090,6 +1090,7 @@
$template->param(countchanged => $countchanged, loopunchanged=>$listunchanged);
=cut
+
sub EditBiblios{
my ($listbiblios,$tagsubfield,$initvalue,$targetvalue,$test)address@hidden;
my $countmatched;
@@ -1128,8 +1129,10 @@
# Non-Zebra GetRecords#
#----------------------------------------------------------------------
-=item
+=head2 NZgetRecords
+
NZgetRecords has the same API as zera getRecords, even if some parameters
are not managed
+
=cut
sub NZgetRecords {
@@ -1140,12 +1143,10 @@
$scan
) = @_;
my $result = NZanalyse($koha_query);
-# use Data::Dumper;
-# warn "=========="address@hidden;
return
(undef,NZorder($result,@$sort_by_ref[0],$results_per_page,$offset),undef);
}
-=item
+=head2 NZanalyse
NZanalyse : get a CQL string as parameter, and returns a list of
biblionumber;title,biblionumber;title,...
the list is builded from inverted index in nozebra SQL table
@@ -1232,6 +1233,7 @@
$left='publisher' if $left eq 'pb';
$left='subject' if $left eq 'su';
$left='koha-Auth-Number' if $left eq 'an';
+ $left='keyword' if $left eq 'kw';
if ($operator) {
#do a specific search
my $dbh = C4::Context->dbh;
@@ -1268,7 +1270,7 @@
my $sth = $dbh->prepare("SELECT biblionumbers FROM nozebra WHERE
server=? AND value LIKE ?");
# split each word, query the DB and build the biblionumbers result
foreach (split / /,$string) {
-# warn "search on all indexes on $_";
+ #warn "search on all indexes on $_";
my $biblionumbers;
next unless $_;
$sth->execute($server, $_);
@@ -1295,6 +1297,15 @@
}
}
+=head2 NZorder
+
+ $finalresult = NZorder($biblionumbers, $ordering,$results_per_page,$offset);
+
+ TODO :: Description
+
+=cut
+
+
sub NZorder {
my ($biblionumbers, $ordering,$results_per_page,$offset) = @_;
# order title asc by default