[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Koha-devel] marc_word re-building problems
From: |
Joshua Ferraro |
Subject: |
Re: [Koha-devel] marc_word re-building problems |
Date: |
Sat Jun 5 19:14:06 2004 |
User-agent: |
Mutt/1.4.1i |
Paul a écrit,
I'm trying to put together this script to rebuild our marc_word
table and I'd like to get some feedback ...
I get the following error when I run the script:
Use of uninitialized value in substitution (s///) at
/usr/local/koha/intranet/modules//C4/Biblio.pm line 947.
Use of uninitialized value in split at
/usr/local/koha/intranet/modules//C4/Biblio.pm line 948.
Is this a bug in Biblio.pm or am I not using this MARCaddword sub correctly?
Here's my script (any suggestions?):
#!/usr/bin/perl -w
#-----------------------------------
# Script Name: build_marc_word.pl
# Script Version: 0.1.0
# Date: 2004/06/05
# Author: Joshua Ferraro [jmf at kados dot org]
# Description: builds a new marc_word table that
# allows for increased searching
# accuracy.
# Usage: build_marc_word.pl
# Revision History:
# 0.1.0 2004/06/05: original version; only uses
# tag 100
#-----------------------------------
use lib '/usr/local/koha/intranet/modules/';
use strict;
use C4::Context;
use C4::Biblio;
my $dbh=C4::Context->dbh;
#FIXME: for now tag 100 is hardcoded; eventually I plan
#to derive a list of tags (and subfields?) from an outfile
my $tag="100";
#get the required data from marc_subfield_table ordered by tag,subfield? not
#sure if that's right ...
my $query="SELECT bibid,tag,tagorder,subfieldid,subfieldorder,subfieldvalue
FROM marc_subfield_table WHERE tag=? ORDER BY tag, subfieldid";
my $sth=$dbh->prepare($query);
#Store the data in array @stuff for manipulation and (later) insertion
my @stuff=$sth->execute($tag);
#for each row ...
while (my ($data)=$sth->fetchrow_array) {
#define the variables to prepare for insertion
my $bibid=$stuff[0];
my $tag=$stuff[1];
my $tagorder=$stuff[2];
my $subfieldid=$stuff[3];
my $subfieldorder=$stuff[4];
my $sentence=$stuff[5];
#insert the row into marc_word using Biblio.pm's MARCaddword sub
MARCaddword($dbh,$bibid,$tag,$tagorder,$subfieldid,$subfieldorder,$sentence);
}
#that's all folks ...
$dbh->disconnect();
On Fri, Jun 04, 2004 at 04:03:50PM +0200, Paul POULAIN wrote:
> Stephen Hedges a écrit :
>
> >Paul, Joshua has convinced me that 1 letter indexing produces better
> >results than anything else we've discussed so far.
> >
> >
> OK, I note it unless otherwise stated.
> PS : I also note to add to framework management a checkbox "do not index
> this field". That's the main stuff...
>
> --
> Paul POULAIN
> Consultant indépendant en logiciels libres
> responsable francophone de koha (SIGB libre http://www.koha-fr.org)
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> >From Windows to Linux, servers to mobile, InstallShield X is the one
> installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> Koha-devel mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/koha-devel
[Koha-devel] marc_word rebuild error message, Joshua Ferraro, 2004/06/08