[Koha-devel] Numerically sorting a new Zebra Index

Fridolyn SOMERS fridolyn.somers at gmail.com
Fri Dec 17 17:39:54 CET 2010


You are right,

I missed the @att type 4.
Then, it should also be set on query.

*I found another error *: le and ge souldn't come with "=" : use ">=" ans
"<=". *

*It gives :*

"(canumber,st-numeric**>=1000 and canumber**,st-numeric<**=2000) or
sort1,canumber**,st-numeric**=0".*

*PS : *
The zero in *sort1**(...)=0* means that this sort in the first (in case
there is a second sort, sort=1, etc).

If it doesn't work, send us the PQF(... @att ...) query from Zebra logs.

Regards,

On Fri, Dec 17, 2010 at 4:48 PM, LAURENT Henri-Damien <
henridamien.laurent at gmail.com> wrote:

> Le 17/12/2010 14:40, Fridolyn SOMERS a écrit :
> > Hie,
> >
> > Have a look at @att 7 of Zebra :
> >
> http://www.indexdata.com/zebra/doc/querymodel-zebra.html#querymodel-zebra-attr-sorting
> >
> > It introduces sorting into query.
> >
> > In ccl.properties you find ascending and descending sort :
> > /sort1 7=1
> > sort2 7=2/
> >
> > So your ccl query looks like :
> > /"(canumber,ge=1000 and "canumber,le=2000) or sort1,canumber=0"/
> >
> > *_PS : _*
> > You must add the sort structure (:s) into "record.abs" :
> >
> > melm 952$z    canumber, canumber:n, canumber:s, item
> >
> > Regards,
>
> Fridolyn, what you said is helpfull but not really fixes the problem...
> It appears that it lies in @attr 4=109 that should be used and not @attr
> 4=1 or @attr 4=6...
> That is to say Senthil has to tell on what TYPE of data he is trying to
> sort.
> Sorting on number is not the same as sorting alphabetical things.
> so in pqf it would be
>        @or your query  @attr 1=canumber @attr 7=1 @attr 4=109 1
> in ccl
>        yourquery or canumber,sort1,st-numeric=1
> or edit the code so that it sends the correct queries.
> Hopes that helps...
>
> --
> Henri-Damien LAURENT
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>



-- 
Fridolyn SOMERS
ICT engineer
PROGILONE - Lyon - France
fridolyn.somers at gmail.com
-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? nettoy?e...
URL: </pipermail/koha-devel/attachments/20101217/2ae28491/attachment-0001.htm>


More information about the Koha-devel mailing list