@@ -, +, @@
onloan items
- Apply the patch
- Pick the right biblio-zebra-indexdefs.xsl file for your setup and
replace the one your Zebra uses [1]
- Replace your bib1.att
- Replace your ccl.properties
- Have at least one record with more than one item, checkout some
item(s) from that record(s).
- Rebuild zebra's indexes:
$ sudo koha-shell kohadev
k$ cd kohaclone
k$ misc/migration_tools/rebuild_zebra.pl -r -b -v -k
(notice the dump directory is kept, you can try the XSLT yourself
running:
$ xsltproc \
etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
/tmp/the_dump_dir/biblios/exported_records | less
value is correct!
- Check Zebra yourself:
$ yaz-client unix:/var/run/koha/kohadev/bibliosocket
Z> base biblios
Z> find @attr 1=9013 @attr 2=5 @attr 4=109 0
items.
Z> s 1+1
- Sign off :-D
[1] In kohadevbox this would be
---
etc/zebradb/biblios/etc/bib1.att | 1 +
etc/zebradb/ccl.properties | 1 +
.../marc21/biblios/biblio-koha-indexdefs.xml | 4 ++++
.../marc21/biblios/biblio-zebra-indexdefs.xsl | 7 +++++++
.../normarc/biblios/biblio-koha-indexdefs.xml | 4 ++++
.../unimarc/biblios/biblio-koha-indexdefs.xml | 4 ++++
misc/migration_tools/rebuild_zebra.pl | 23 ++++++++++++++--------
7 files changed, 36 insertions(+), 8 deletions(-)
--- a/etc/zebradb/biblios/etc/bib1.att
+++ a/etc/zebradb/biblios/etc/bib1.att
@@ -220,6 +220,7 @@ att 9009 cn-prefix
att 9010 cn-suffix
att 9011 Suppress
att 9012 Identifier-other
+att 9013 not-onloan-count
# Items Index
att 8001 withdrawn
--- a/etc/zebradb/ccl.properties
+++ a/etc/zebradb/ccl.properties
@@ -994,6 +994,7 @@ date-entered-on-file 1=date-entered-on-file
extent 1=Extent
llength 1=llength
Summary 1=Summary
+not-onloan-count 1=9013 4=109
###
# Items Index
--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
+++ a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
@@ -1370,6 +1370,10 @@
Note:p
+
+ not-onloan-count:n
+
+
au:0
--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
+++ a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
@@ -1242,6 +1242,13 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
+
+
+
+
+
+
+
--- a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml
+++ a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml
@@ -969,6 +969,10 @@
itype:w
+
+ not-onloan-count:n
+
+
au:0
--- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml
+++ a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml
@@ -1444,6 +1444,10 @@
totalissues:s
+
+ not-onloan-count:n
+
+
se:0
--- a/misc/migration_tools/rebuild_zebra.pl
+++ a/misc/migration_tools/rebuild_zebra.pl
@@ -635,19 +635,26 @@ sub generate_deleted_marc_records {
}
sub get_corrected_marc_record {
- my ($record_type, $record_number) = @_;
+ my ( $record_type, $record_number ) = @_;
- my $marc = get_raw_marc_record($record_type, $record_number);
+ my $marc = get_raw_marc_record( $record_type, $record_number );
- if (defined $marc) {
+ if ( defined $marc ) {
fix_leader($marc);
- if ($record_type eq 'authority') {
- fix_authority_id($marc, $record_number);
- } elsif ($record_type eq 'biblio' && C4::Context->preference('IncludeSeeFromInSearches')) {
- my $normalizer = Koha::RecordProcessor->new( { filters => 'EmbedSeeFromHeadings' } );
+ if ( $record_type eq 'authority' ) {
+ fix_authority_id( $marc, $record_number );
+ }
+ elsif ( $record_type eq 'biblio' ) {
+
+ my @filters;
+ push @filters, 'EmbedItemsAvailability';
+ push @filters, 'IncludeSeeFromInSearches'
+ if C4::Context->preference('IncludeSeeFromInSearches');
+
+ my $normalizer = Koha::RecordProcessor->new( { filters => \@filters } );
$marc = $normalizer->process($marc);
}
- if (C4::Context->preference("marcflavour") eq "UNIMARC") {
+ if ( C4::Context->preference("marcflavour") eq "UNIMARC" ) {
fix_unimarc_100($marc);
}
}
--