[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5839: Add index stocknumber on 952$i

Marcel de Rooy M.de.Rooy at rijksmuseum.nl
Mon Apr 4 10:38:02 CEST 2011


From: Katrin Fischer <Katrin.Fischer.83 at web.de>

This patch adds a new index for stocknumber on field 952$i.

Note: For testing you have to copy over the changed files
from  kohaclone/etc/zebradb/ to your koha-dev/etc/zebradb folders.
Reindex.

To test:
1) Add 952$i to your frameworks
2) Add an item with 952$i
3) Search for your 952$i value in keyword search
4) Search for stocknumber, using stocknumber:<your 952$i value> or inv:<...

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
---
 C4/Search.pm                                    |    2 ++
 etc/zebradb/biblios/etc/bib1.att                |    1 +
 etc/zebradb/ccl.properties                      |    2 ++
 etc/zebradb/marc_defs/marc21/biblios/record.abs |    2 +-
 4 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index b8939b6..c69e787 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -993,6 +993,8 @@ sub getIndexes{
                     'reserves',
                     'restricted',
                     'stack',
+                    'stocknumber',
+                    'inv',
                     'uri',
                     'withdrawn',
 
diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att
index 3397664..ed68092 100644
--- a/etc/zebradb/biblios/etc/bib1.att
+++ b/etc/zebradb/biblios/etc/bib1.att
@@ -105,6 +105,7 @@ att 1034    ctype
 att 1035    Anywhere
 att 1036    Author-Title-Subject
 att 1045    Record-control-number
+att 1062    stocknumber
 att 1079    Subject-topical
 
 
diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties
index 709410d..59c2705 100644
--- a/etc/zebradb/ccl.properties
+++ b/etc/zebradb/ccl.properties
@@ -984,6 +984,8 @@ mc-loc location
 acqsource 1=8015
 coded-location-qualifier 1=8016
 price 1=8017
+stocknumber 1=1062
+inv stocknumber
 stack 1=8018
 issues 1=8019
 renewals 1=8020
diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs
index 06080b5..d3f83ad 100755
--- a/etc/zebradb/marc_defs/marc21/biblios/record.abs
+++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs
@@ -295,7 +295,7 @@ melm 952$e      acqsource
 melm 952$f      coded-location-qualifier
 melm 952$g      price
 #melm 952$h     
-#melm 952$i     
+melm 952$i      stocknumber
 melm 952$j      stack:n,stack:w
 #melm 952$k     
 melm 952$l      issues:n,issues:w,issues:s
-- 
1.6.0.6



More information about the Koha-patches mailing list