[Koha] Fwd: koha: sort by year
Peter Huerter
pete.huerter at gmail.com
Tue Jan 11 07:56:54 NZDT 2011
I am only a beginner but perhaps I can help ...
Sorting is probably related to Searching. I had a similar problem recently.
Advanced search by date range was not working for me.
An advanced search by date range query is automatically generated and looks
like this:
yr,st-numeric,ge=1967 and yr,st-numeric,le=2000
"yr" is a search index. Search indexes are defined in the ccl.properties
file. My ccl.properties file is located in /etc/koha/zebradb. I am using
zebra.
In that file yr (and pubdate) is(are) defined, along with copydate, acqdate
and many other search indexes.
I actually had to change the definition of pubdate in order for "yr:1967" to
work (it wasn't by default).
pubdate 1=31 r=r
yr pubdate
Date-of-publication pubdate
yr maps to pubdate as an alias.
Once I did this, and populated 008 Date1, and Date2 my date restricted
searches started to work.
My guess is that if you want to sort on date you will need to fill these in.
I use MarcEdit for this.
For Example:
-----------------
I use 260$c, and 008 Date 2 as copyright date. I use 260$g and 008 Date 1
as publication date.
- open .mrk file in MarkEdit, and select Tools->Edit Subfield Data, and do
the following:
map 260$c to 008 date 2 field:
Field: 260
Subfield: c
Field Data:
Replace with: 008|11||
Select "Move Subfield Data"
Click "Replace Text"
map 260$g to 008 date 1 field:
Field: 260
Subfield: g
Field Data:
Replace with: 008|7||
Select "Move Subfield Data"
Click "Replace Text"
(for more details see example here:
http://people.oregonstate.edu/~reeset/blog/archives/728)
008 Date1, and Date2 seem to contain duplicated information. I'm not really
sure how the search index copydate resolves to 260$c. If you can figure
that out then perhaps you could set up your sorting to only sort on 260$c
instead of bringing in the 008 dates. Defining the 008 dates may be
important for other reasons. I don't know.
I hope this contains a lead for your case,
Yours,
Pete.
--
View this message in context: http://koha.1045719.n5.nabble.com/Fwd-koha-sort-by-year-tp3335093p3335273.html
Sent from the Koha - Discuss mailing list archive at Nabble.com.
More information about the Koha
mailing list