From 5043d18a363d05854c665f528a3114c5b96ba758 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Fri, 16 Aug 2013 12:29:05 +0200 Subject: [PATCH] Bug 10740 - date created and modified indexes in ccl.properties and QP date created and modified indexes are defined in bib1.att as : 1011 date-entered-on-file 1012 date-time-last-modified This patch used those indexes in ccl.properties where there where commented. Also adds date-time-last-modified to known indexes and in QueryParser configuration. Test plan : - Check indexes date-entered-on-file and date-time-last-modified are used in biblio/records.abs - Index all database - Perform a search on those indexes using simple search : date-entered-on-file:xxxx --- C4/Search.pm | 1 + etc/searchengine/queryparser.yaml | 11 ++++++++++- etc/zebradb/biblios/etc/bib1.att | 2 +- etc/zebradb/ccl.properties | 5 ++--- etc/zebradb/marc_defs/marc21/biblios/record.abs | 2 +- etc/zebradb/marc_defs/normarc/biblios/record.abs | 2 +- etc/zebradb/marc_defs/unimarc/biblios/record.abs | 2 +- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 04e4918..efd9184 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -961,6 +961,7 @@ sub getIndexes{ 'date-entered-on-file', 'Date-of-acquisition', 'Date-of-publication', + 'date-time-last-modified', 'Dewey-classification', 'EAN', 'extent', diff --git a/etc/searchengine/queryparser.yaml b/etc/searchengine/queryparser.yaml index 0cce85c..478521f 100644 --- a/etc/searchengine/queryparser.yaml +++ b/etc/searchengine/queryparser.yaml @@ -351,12 +351,21 @@ field_mappings: date-entered-on-file: bib1_mapping: biblioserver: - 1: date-entered-on-file + 1: 1011 enabled: 1 index: date-entered-on-file aliases: - date-entered-on-file label: Date-entered-on-file + date-time-last-modified: + bib1_mapping: + biblioserver: + 1: 1012 + enabled: 1 + index: date-time-last-modified + aliases: + - date-time-last-modified + label: Date-time-last-modified datelastborrowed: bib1_mapping: biblioserver: diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index 91aa696..a18efef 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -80,7 +80,7 @@ att 1008 Subject-LC-childrens att 1009 Subject-name-personal att 1010 Body-of-text att 1011 date-entered-on-file -att 1012 Date/time-last-modified +att 1012 date-time-last-modified att 1013 Authority/format-id att 1014 Concept-text att 1015 Concept-reference diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 14aa7b2..be56a9b 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -346,11 +346,11 @@ acqdate Date-of-acquisition #Date/time added to 1011 The date and time that a 008/00-05 #database record was added to the # database. -#Date-time-added-to-db 1=1011 +date-entered-on-file 1=1011 #Date/time last 1012 The date and time a record 005 #modified was last updated. -Date/time-last-modified 1=1012 +date-time-last-modified 1=1012 #Identifier-- 1013 Used in full-text searching #authority/format to indicate to the target @@ -965,7 +965,6 @@ cn-prefix 1=9009 cn-suffix 1=9010 Suppress 1=9011 id-other 1=9012 -date-entered-on-file 1=date-entered-on-file extent 1=Extent llength 1=llength Summary 1=Summary diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs index e17adb0..f33f154 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -49,7 +49,7 @@ xelm /record/leader llength:w:range(data,0,5),rtype:w:range(data,6,1),Bib-level: # example: xelm /record/leader l1:w:range(data,0,5),l2:w:range(data,10,2) melm 001 Control-number -melm 005 Date/time-last-modified +melm 005 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 008 date-entered-on-file:n:range(data,0,5),date-entered-on-file:s:range(data,0,5),pubdate:w:range(data,7,4),pubdate:n:range(data,7,4),pubdate:y:range(data,7,4),pubdate:s:range(data,7,4),pl:w:range(data,15,3),ta:w:range(data,22,1),ff8-23:w:range(data,23,1),ff8-29:w:range(data,29,1),lf:w:range(data,33,1),bio:w:range(data,34,1),ln:w:range(data,35,3),ctype:w:range(data,24,4),Record-source:w:range(data,39,0) diff --git a/etc/zebradb/marc_defs/normarc/biblios/record.abs b/etc/zebradb/marc_defs/normarc/biblios/record.abs index 76ec04f..bb1112b 100644 --- a/etc/zebradb/marc_defs/normarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/normarc/biblios/record.abs @@ -65,7 +65,7 @@ xelm /record/leader llength:w:range(data,0,5),rtype:w:range(data,6,1),Bib-level: # example: xelm /record/leader l1:w:range(data,0,5),l2:w:range(data,10,2) melm 001 Control-number -# NiN melm 005 Date/time-last-modified +# NiN melm 005 date-time-last-modified # TODO 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) diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index aa0f74d..d620d75 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -27,7 +27,7 @@ melm 001 Local-number,Local-number:n melm 009 Identifier-standard:w,Identifier-standard:n melm 090$9 Local-number,Local-number:n melm 099$c date-entered-on-file:s,date-entered-on-file:n,date-entered-on-file:y,Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s -melm 099$d Date/time-last-modified:s,Date/time-last-modified:n,Date/time-last-modified:y +melm 099$d date-time-last-modified:s,date-time-last-modified:n,date-time-last-modified:y melm 099$t ccode:w # ISBN -- 1.8.3.2