improvements to zebra configuration files
authorJoshua Ferraro <jmf@liblime.com>
Sun, 21 Oct 2007 20:11:34 +0000 (15:11 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 22 Oct 2007 00:14:12 +0000 (19:14 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
etc/zebradb/biblios/etc/bib1.att
etc/zebradb/biblios/etc/record.abs
etc/zebradb/ccl.properties
etc/zebradb/etc/default.idx
etc/zebradb/zebra-authorities.cfg
etc/zebradb/zebra-biblios.cfg
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tmpl
misc/migration_tools/rebuild_zebra_idx.pl
tools/inventory.pl

index 2ade049..1bebbb3 100644 (file)
@@ -104,48 +104,75 @@ att 1034            ctype
 att 1035            Anywhere
 att 1036            Author-Title-Subject
 
 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
 # record length according to the leader
-att 8005                       llength
+# att 8005                     llength
 #att 8002                      Summary 
 #att 8900                      Call-Number
 #att 8002                      Summary 
 #att 8900                      Call-Number
-
 # Usually Target Audience 008/22
 att 8822                       ta
 # Usually Target Audience 008/22
 att 8822                       ta
-
 # Usually Form of item 008/23
 att 8823                       ff8-23
 # Usually Form of item 008/23
 att 8823                       ff8-23
-
 # Usually Nature of contents 008/24-27
 att 8824                       ff8-24-27
 # 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 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 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
 # 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 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
 # 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
 # Author-in-order - firstname lastname in 245$c statement of responsibility
-att 8901               Author-in-order
+#att 8901              Author-in-order
index af63eaa..efb436a 100644 (file)
@@ -17,7 +17,7 @@ esetname B @
 
 marc usmarc.mar
 systag sysno rank
 
 marc usmarc.mar
 systag sysno rank
-xpath disable
+xpath enable
 
 # pl = Published Place
 # ta = Target Audience 002/22
 
 # 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)
 
 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)
 # 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)
 
 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 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
index 33e751d..034f220 100644 (file)
@@ -243,7 +243,9 @@ callnum Local-classification
 #                           record or the holding
 #                           location.  The code space is
 #                           defined by the target.
 #                           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.
 #
 #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
 #Language
 #ln 1=8805
 #language 1=8805
-
 #Musical Composition
 #mc
 
 #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
 # Publisher Location
 
 Place-publication 1=59
@@ -899,7 +944,7 @@ pl Place-publication
 #pl 1=59
 
 # Extent
 #pl 1=59
 
 # Extent
-Extent 1=8001
+#Extent 1=8001
 
 #Summary                       1=8002
 #att 8900            
 
 #Summary                       1=8002
 #att 8900            
@@ -917,7 +962,7 @@ ff8-34 1=8834
 #att 8702            ff7-02
 #att 9520            withdrawn
 #att 9521            lost
 #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
 #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 +
 @case 0
 # Tokens for CCL operators (it seems you can assign multiple tokens per operator which is nice)
 @and and +
+#and +
 @or or |
 @or or |
+#or |
 # make sure - doesn't conflict with another usage of this token
 # 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:
 @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:
index 6ddef3e..17f7608 100644 (file)
@@ -8,6 +8,8 @@
 index w
 completeness 0
 position 1
 index w
 completeness 0
 position 1
+alwaysmatches 1
+firstinfield 1
 charmap word-phrase-utf.chr
 #firstinfield 1
 
 charmap word-phrase-utf.chr
 #firstinfield 1
 
index c0ae91e..a29ab86 100644 (file)
@@ -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?
 # $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
 
 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
 # 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
 passw.passwd
 shadow
 register: __BASE_DIR__/zebradb/authorities/register:4G
index 5e44051..261a5d4 100644 (file)
@@ -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?
 # $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
 
 # 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
 # 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
 passw.passwd
 shadow
 register: __BASE_DIR__/zebradb/biblios/register:4G
index ecb0c79..9e36d20 100644 (file)
@@ -8,10 +8,14 @@
         */
        function add_field() {
            var ButtonPlus = document.getElementById('ButtonPlus');
         */
        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);
        }
 </script>
 </head>
        }
 </script>
 </head>
@@ -65,6 +69,7 @@
                 <p><label for="scan">Scan Indexes</label><input type="checkbox" name="scan" id="scan" value="1" /></p>
             <!-- /TMPL_IF -->
         <!-- /TMPL_IF -->
                 <p><label for="scan">Scan Indexes</label><input type="checkbox" name="scan" id="scan" value="1" /></p>
             <!-- /TMPL_IF -->
         <!-- /TMPL_IF -->
+               <div>
         <!-- TMPL_IF NAME="expanded_options" -->
             <select name="op">
                 <option value="and" selected="selected">and</option>
         <!-- TMPL_IF NAME="expanded_options" -->
             <select name="op">
                 <option value="and" selected="selected">and</option>
                 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
             <!-- /TMPL_IF -->
         <!-- /TMPL_IF -->
                 <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a>
             <!-- /TMPL_IF -->
         <!-- /TMPL_IF -->
-
+               </div>
     <!-- /TMPL_LOOP -->
     </fieldset>
 <!-- /BOOLEAN SEARCH OPTIONS -->
     <!-- /TMPL_LOOP -->
     </fieldset>
 <!-- /BOOLEAN SEARCH OPTIONS -->
     <fieldset><legend>Location and availability: </legend>
         <p>
         <label>Library</label><select name="limit" id="branchloop">
     <fieldset><legend>Location and availability: </legend>
         <p>
         <label>Library</label><select name="limit" id="branchloop">
-        <option value="">All Branches</option>
+        <option value="">All Locations</option>
         <!-- TMPL_LOOP NAME="branchloop" -->
         <option value="<!-- TMPL_VAR NAME='value' -->"><!-- TMPL_VAR NAME='branchname' --></option>
         <!-- /TMPL_LOOP -->
         <!-- TMPL_LOOP NAME="branchloop" -->
         <option value="<!-- TMPL_VAR NAME='value' -->"><!-- TMPL_VAR NAME='branchname' --></option>
         <!-- /TMPL_LOOP -->
index 7c2c90f..680c00e 100755 (executable)
@@ -33,10 +33,7 @@ die;
 $|=1; # flushes output
 
 my $dbh = C4::Context->dbh;
 $|=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");
 
 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 $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";
        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;
        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";
index a029009..e0fe667 100755 (executable)
@@ -54,7 +54,7 @@ my ($template, $borrowernumber, $cookie)
 
 my $branches = GetBranches();
 my @branch_loop;
 
 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'}, 
 for my $branch_hash (keys %$branches) {
        push @branch_loop, {value => "$branch_hash",
                           branchname => $branches->{$branch_hash}->{'branchname'},