[Koha] OAI-PMH Set Question

Pedro Amorim pjamorim91 at gmail.com
Fri Nov 24 00:01:00 NZDT 2017


Hello Alphie,

That database error is expected (I think) because the script will always
attempt to insert the records matching your mappings, regardless or already
being in the set or not, unless you run with the -r *reset* flag.

So just so I'm understanding correctly in the future, when will I need to
run build_oai_sets.pl? Is it anytime I create a new set or anytime I load
new records into Koha? Or is it both?

Look for *OAI-PMH:AutoUpdateSets* syspref and enable it. I haven't tested
this but it seems to me it' what you're looking for.
What I'd do is I'd update a biblio record after enabling the syspref and
check if it's working, i.e. the record matching the mapping would
automatically be inserted in the set.

Have a good one,

Pedro Amorim

On 22 November 2017 at 23:24, Alphie Garcia <alphie at hawaii.edu> wrote:

> Thanks, Mark. It gave me a different set of errors this time, but testing
> the sets in OAI, I see that the records are now displaying which is great.
>
> On the errors:
>
> Running perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl in
> koha-shell gave me a 100 of these SQL errors:
>
> DBD::mysql::st execute failed: Duplicate entry '100-3' for key 'PRIMARY'
> [for Statement "
>         INSERT INTO oai_sets_biblios (set_id, biblionumber)
>         VALUES (?,?)
>     " with ParamValues: 0='3', 1='100'] at /usr/share/koha/lib/C4/OAI/
> Sets.pm
> line 597.
>
> Again, the records seem to be populating when I look at the OAI output so I
> guess it's good?
>
> So just so I'm understanding correctly in the future, when will I need to
> run build_oai_sets.pl? Is it anytime I create a new set or anytime I load
> new records into Koha? Or is it both?
>
>
>
> On Wed, Nov 22, 2017 at 1:01 PM, Mark Alexander <marka at pobox.com> wrote:
>
> > Excerpts from Alphie Garcia's message of 2017-11-22 09:56:03 -1000:
> > > When I'm in Linux and type:
> > >
> > > perl /usr/share/koha/bin/migration_tools/build_oai_sets.pl
> > >
> > >
> > > I get the following error:
> > >
> > > Can't locate C4/Context.pm in @INC (you may need to install the
> > C4::Context
> > > module) (@INC contains: /etc/perl
> >
> > Try running this command first:
> >
> >   koha-shell INSTANCE
> >
> > where INSTANCE is the name of your Koha instance.  That should set up
> > the environment so that the build_oai_sets.pl script will run correctly.
> >
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list