[Koha] Fwd: Numerically sorting a new Zebra Index
ssenthilanand at gmail.com
Fri Dec 17 16:23:34 NZDT 2010
---------- Forwarded message ----------
From: Senthil Anand <ssenthilanand at gmail.com>
Date: 16 December 2010 19:51
Subject: Numerically sorting a new Zebra Index
To: koha-devel at lists.koha-community.org
Running Koha 3.06 on Centos 5.5.
I want to add a new item attribute, canumber to the Zebra Index. It
should be visible on the staff client. All values are numbers ranging
from 1 to around 15000000.
I have done the following steps:
1. In bib1.att
att 8032 canumber
2. In the marc21 record.abs
melm 952$z canumber, canumber:n, item
3. In ccl.properties
Zebra has been reindexed.
I want to use the canumber in place of acq-date in the Bulk label
In label-item-search.pl under intranet/cgi-bin/labels . I am
performing a search using the following limits :
"canumber,ge="<textbox data> and
The search actually works and returns results but the results seem to
be sorted as text. ie searching beween 1000 and 1010 returns items
with canumber 1000000 etc. As a test I changed the attribute of
itemnotes in items table from varchar to int(11) in a test machine and
reran the index. Still not getting proper numeric sorting.
The Zebra docs mention that lexicographic sorting is default and
numeric sorting has to be enabled. As I understood it is defined in
the record.abs. How can I change the mappings in record.abs to get
numerically sorted results ? Is the query I am using in
label-item-search.pl correct ?
More information about the Koha