From 9d29ce5d58614b56e71044e47b11cc1229604ccf Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Sun, 21 Oct 2007 15:11:34 -0500 Subject: [PATCH] improvements to zebra configuration files Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- etc/zebradb/biblios/etc/bib1.att | 69 ++++++++++----- etc/zebradb/biblios/etc/record.abs | 85 +++++++++++++------ etc/zebradb/ccl.properties | 58 +++++++++++-- etc/zebradb/etc/default.idx | 2 + etc/zebradb/zebra-authorities.cfg | 4 +- etc/zebradb/zebra-biblios.cfg | 4 +- .../prog/en/modules/catalogue/advsearch.tmpl | 17 ++-- misc/migration_tools/rebuild_zebra_idx.pl | 11 +-- tools/inventory.pl | 2 +- 9 files changed, 182 insertions(+), 70 deletions(-) diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index 2ade049a4f..1bebbb3d5a 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -104,48 +104,75 @@ att 1034 ctype att 1035 Anywhere att 1036 Author-Title-Subject -# Koha Specific Stuff -att 8001 Extent -att 8910 Koha-Auth-Number +# Koha Local-Use Biblio Indexes +att 9001 Control-number +att 9002 biblioitemnumber +att 9003 totalissues +att 9004 cn-bib-source +att 9005 cn-bib-sort +att 9006 itemtype +att 9007 cn-class +att 9008 cn-item +att 9009 cn-prefix +att 9010 cn-suffix +# Items Index +att 8001 withdrawn +att 8002 lost +att 8003 classification-source +att 8004 materials-specified +att 8005 damaged +att 8006 restricted +att 8007 cn-sort +att 8008 notforloan +att 8009 ccode +att 8010 itemnumber +att 8011 Code-institution +att 8012 holdingbranch +att 8013 location +att 8014 Date-of-acquisition +att 8015 acqsource +att 8016 coded-location-qualifier +att 8017 price +att 8018 stack +att 8019 issues +att 8020 renewals +att 8021 reserves +att 8022 Local-classification +att 8023 barcode +att 8024 onloan +att 8025 datelastseen +att 8026 datelastborrowed +att 8027 copynumber +att 8028 uri +att 8029 replacementprice +att 8030 replacementpricedate + +# att 8001 Extent +# att 8910 Koha-Auth-Number # record length according to the leader -att 8005 llength +# att 8005 llength #att 8002 Summary #att 8900 Call-Number - # Usually Target Audience 008/22 att 8822 ta - # Usually Form of item 008/23 att 8823 ff8-23 - # Usually Nature of contents 008/24-27 att 8824 ff8-24-27 - # Usually Content-type, also Form of item for maps 008/29 att 8829 ff8-29 - # Usually Literary Form 008/33 att 8833 lf #att 8833 ff8-33 - # Usually Biography, also Special format characteristics for maps 008/34 att 8834 bio #att 8834 ff8-34 - att 8700 ff7-00 att 8701 ff7-01 att 8702 ff7-02 att 8703 ff7-01-02 - -att 9529 shelf-location -att 9100 dynixbib-id -att 9520 withdrawn -att 9521 lost -att 9522 onloan -att 9523 popularity -att 9526 barcode # Author-personal-bibliography - lastname,firstname in 100$a -att 8900 Author-personal-bibliography +#att 8900 Author-personal-bibliography # Author-in-order - firstname lastname in 245$c statement of responsibility -att 8901 Author-in-order +#att 8901 Author-in-order diff --git a/etc/zebradb/biblios/etc/record.abs b/etc/zebradb/biblios/etc/record.abs index af63eaa382..efb436aa21 100644 --- a/etc/zebradb/biblios/etc/record.abs +++ b/etc/zebradb/biblios/etc/record.abs @@ -17,7 +17,7 @@ esetname B @ marc usmarc.mar systag sysno rank -xpath disable +xpath enable # pl = Published Place # ta = Target Audience 002/22 @@ -32,10 +32,10 @@ xpath disable all any # melm 000 rtype:n:range(data,06,1),Bib-level:w:range(data,07,01) -# xelm /record/leader llength:w:range(data,0,5),rtype:w:range(data,6,1),Bib-level:w:range(data,7,1) - +xelm /record/leader llength:w:range(data,0,5),rtype:w:range(data,6,1),Bib-level:w:range(data,7,1) # example: xelm /record/leader l1:w:range(data,0,5),l2:w:range(data,10,2) -#melm 001 Local-number + +melm 001 Control-number melm 005 Date,Date/time-last-modified melm 007 Microform-generation:n:range(data,11,1),Material-type,ff7-00:w:range(data,0,1),ff7-01:w:range(data,1,1),ff7-02:w:range(data,2,1),ff7-01-02:w:range(data,0,2) @@ -213,25 +213,58 @@ melm 811$t Author-title,Name-and-title,Title,Title-series melm 811 Author,Author-name-corporate,Name,Conference-name melm 830 Title,Title-series melm 840 Title,Title-series -melm 852$a Code-institution - -melm 959$0 withdrawn:n -melm 959$1 lost:n -melm 959$2 onloan - -# c is collection code, d is the new item type -# Record-source is homebranch. -melm 959$n Record-source -melm 942$c Material-type -melm 942$d Material-type -melm 910$a dynixbib-id:n -#melm 942$k Call-Number -#melm 942$k Local-Number !:w,!:p,!:s -#melm 942$k Local-classification:w,Local-classification:p,Local-classification:s -melm 959$d Local-classification,Local-classification:w,Local-classification:p,Local-classification:s -melm 959$p Stock-number -melm 959$c shelf-location -melm 959$s popularity:n,popularity:s -melm 959$v Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s -melm 959$t Material-type -melm 959$b barcode,barcode:n + +############################### +# Koha Local-Use Biblio Indexes +melm 999$c Local-Number !:w,!:p,!:s +melm 999$d biblioitemnumber:n,!:s +melm 942$0 totalissues:n,!:s +melm 942$2 cn-bib-source +melm 942$6 cn-bib-sort:n,!:s +melm 942$c itemtype:w + +# need to check bib1 +melm 942$h cn-class +melm 942$i cn-item +melm 942$k cn-prefix +melm 942$m cn-suffix + +# Items Indexes +melm 952$0 withdrawn:n,!:w +melm 952$1 lost:n,!:w +melm 952$2 classification-source +melm 952$3 materials-specified +melm 952$4 damaged:n,!:w +melm 952$5 restricted:n,!:w +melm 952$6 cn-sort:n,!:s +melm 952$7 notforloan:n,!:w +melm 952$8 ccode +melm 952$9 itemnumber:n,!:s +melm 952$a Code-institution +melm 952$b holdingbranch +melm 952$c location + +#dateaccessioned +melm 952$d Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s +melm 952$e acqsource +melm 952$f coded-location-qualifier +melm 952$g price +#melm 952$h +#melm 952$i +melm 952$j stack:n,!:w +#melm 952$k +melm 952$l issues:n,!:w +melm 952$m renewals:n,!:w +melm 952$n reserves:n,!:w +melm 952$o Local-classification:w,Local-classification:p,Local-classification:s +melm 952$p barcode,!:n +melm 952$q onloan:n,!:w +melm 952$r datelastseen +melm 952$s datelastborrowed +melm 952$t copynumber +melm 952$u uri:u,!:w +melm 952$v replacementprice +melm 952$w replacementpricedate +#melm 952$x +#melm 952$y +#melm 952$z diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 33e751d99c..034f220864 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -243,7 +243,9 @@ callnum Local-classification # record or the holding # location. The code space is # defined by the target. -#Code-institution 1=56 +Code-institution 1=56 +homebranch Code-institution + # #Code-language 54 A code that indicates the 008/35-37, 041 # language of the item. @@ -888,10 +890,53 @@ ext 4=1 6=3 #Language #ln 1=8805 #language 1=8805 - #Musical Composition #mc +# Koha Local-Use Biblio Indexes +Control-number 1=9001 +biblionumber 1=9002 +totalissues 1=9003 +cn-bib-source 1=9004 +cn-bib-sort 1=9005 +itemtype 1=9006 +cn-class 1=9007 +cn-item 1=9008 +cn-prefix 1=9009 +cn-suffix 1=9010 + +# Items Index +withdrawn 1=8001 4=109 +lost 1=8002 4=109 +classification-source 1=8003 +materials-specified 1=8004 +damaged 1=8005 4=109 +restricted 1=8006 4=109 +cn-sort 1=8007 +notforloan 1=8008 4=109 +ccode 1=8009 +itemnumber 1=8010 4=109 +Code-institution 1=8011 +holdingbranch 1=8012 +location 1=8013 +Date-of-acquisition 1=8014 +acqsource 1=8015 +coded-location-qualifier 1=8016 +price 1=8017 +stack 1=8018 4=109 +issues 1=8019 4=109 +renewals 1=8020 4=109 +reserves 1=8021 4=109 +Local-classification 1=8022 +barcode 1=8023 +onloan 1=8024 4=109 +datelastseen 1=8025 +datelastborrowed 1=8026 +copynumber 1=8027 +uri 1=8028 +replacementprice 1=8029 +replacementpricedate 1=8030 + # Publisher Location Place-publication 1=59 @@ -899,7 +944,7 @@ pl Place-publication #pl 1=59 # Extent -Extent 1=8001 +#Extent 1=8001 #Summary 1=8002 #att 8900 @@ -917,7 +962,7 @@ ff8-34 1=8834 #att 8702 ff7-02 #att 9520 withdrawn #att 9521 lost -lost 1=9521 4=109 +#lost 1=9521 4=109 #att 9522 onloan ############## SUBJECT-RELATED @@ -1010,9 +1055,12 @@ title-sort-az 7=1 1=36 @case 0 # Tokens for CCL operators (it seems you can assign multiple tokens per operator which is nice) @and and + +#and + @or or | +#or | # make sure - doesn't conflict with another usage of this token -@not not +@not not ! +#not @set set # Not sure if you can specify tokens for prox operators, but here are the defaults # proximity of a, b - distance n - any order: diff --git a/etc/zebradb/etc/default.idx b/etc/zebradb/etc/default.idx index 6ddef3e840..17f76084db 100644 --- a/etc/zebradb/etc/default.idx +++ b/etc/zebradb/etc/default.idx @@ -8,6 +8,8 @@ index w completeness 0 position 1 +alwaysmatches 1 +firstinfield 1 charmap word-phrase-utf.chr #firstinfield 1 diff --git a/etc/zebradb/zebra-authorities.cfg b/etc/zebradb/zebra-authorities.cfg index c0ae91eacf..a29ab86cda 100644 --- a/etc/zebradb/zebra-authorities.cfg +++ b/etc/zebradb/zebra-authorities.cfg @@ -4,7 +4,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:__PREFIX__/share/koha/etc/zebradb/authorities/tab:__PREFIX__/share/koha/etc/zebradb/tab +profilePath:__PREFIX__/share/koha/etc/zebradb/authorities/etc:__PREFIX__/share/koha/etc/zebradb/etc encoding: UTF-8 # modulePath - where to look for loadable zebra modules @@ -28,7 +28,7 @@ storeData:1 # Lock File Area lockDir: __BASE_DIR__/zebradb/authorities/lock perm.anonymous:r -perm.kohaadmin:rw +perm.__ZEBRA_USER__:rw passw.passwd shadow register: __BASE_DIR__/zebradb/authorities/register:4G diff --git a/etc/zebradb/zebra-biblios.cfg b/etc/zebradb/zebra-biblios.cfg index 5e44051456..261a5d4c6f 100644 --- a/etc/zebradb/zebra-biblios.cfg +++ b/etc/zebradb/zebra-biblios.cfg @@ -3,7 +3,7 @@ # $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $ # # Where are the config files located? -profilePath:__PREFIX__/share/koha/etc/zebradb/biblios/tab:__PREFIX__/share/koha/etc/zebradb/tab +profilePath:__PREFIX__/share/koha/etc/zebradb/biblios/etc:__PREFIX__/share/koha/etc/zebradb/etc # modulePath - where to look for loadable zebra modules modulePath: /usr/lib/idzebra-2.0/modules @@ -25,7 +25,7 @@ storeData:1 # Lock File Area lockDir: __BASE_DIR__/zebradb/biblios/lock perm.anonymous:r -perm.kohaadmin:rw +perm.__ZEBRA_USER__:rw passw.passwd shadow register: __BASE_DIR__/zebradb/biblios/register:4G diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl index ecb0c790b8..9e36d20e0b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl @@ -8,10 +8,14 @@ */ function add_field() { var ButtonPlus = document.getElementById('ButtonPlus'); - var line = ButtonPlus.parentNode; - var dad = line.parentNode; - dad.appendChild(line.cloneNode(true)); - line.removeChild(ButtonPlus); + var line = ButtonPlus.parentNode; + var dad = line.parentNode; + dad.appendChild(line.cloneNode(true)); + line.removeChild(ButtonPlus); + //var line = ButtonPlus.parentNode; + //var dad = line.parentNode; + //dad.appendChild(line.cloneNode(true)); + //line.removeChild(ButtonPlus); } @@ -65,6 +69,7 @@

+
- + diff --git a/misc/migration_tools/rebuild_zebra_idx.pl b/misc/migration_tools/rebuild_zebra_idx.pl index 7c2c90f92c..680c00ebac 100755 --- a/misc/migration_tools/rebuild_zebra_idx.pl +++ b/misc/migration_tools/rebuild_zebra_idx.pl @@ -33,10 +33,7 @@ die; $|=1; # flushes output my $dbh = C4::Context->dbh; -my $cgidir = C4::Context->intranetdir ."/cgi-bin"; -unless (opendir(DIR, "$cgidir")) { - $cgidir = C4::Context->intranetdir."/"; -} +my $cgidir = C4::Context->intranetdir."/"; my $starttime = gettimeofday; my $sth = $dbh->prepare("select biblionumber from biblio"); @@ -44,12 +41,12 @@ $sth->execute; my $i=0; while ((my $biblionumber) = $sth->fetchrow) { my $record = GetMarcBiblio($biblionumber); - my $filename = $cgidir."/zebra/biblios/BIBLIO".$biblionumber."iso2709"; + my $filename = $cgidir."/tmp/BIBLIO".$biblionumber.".iso2709"; open F,"> $filename"; - print F $record->as_xml(); + print F $record->as_usmarc(); close F; $i++; print "\r$i" unless ($i % 100); } my $timeneeded = gettimeofday - $starttime; -print "\n$i MARC record done in $timeneeded seconds\n"; \ No newline at end of file +print "\n$i MARC record done in $timeneeded seconds\n"; diff --git a/tools/inventory.pl b/tools/inventory.pl index a0290099cc..e0fe667f94 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -54,7 +54,7 @@ my ($template, $borrowernumber, $cookie) my $branches = GetBranches(); my @branch_loop; -push @branch_loop, {value => "", branchname => "All Branches", }; +push @branch_loop, {value => "", branchname => "All Locations", }; for my $branch_hash (keys %$branches) { push @branch_loop, {value => "$branch_hash", branchname => $branches->{$branch_hash}->{'branchname'}, -- 2.39.5