Re: [greenstone-devel] sorting with AZCompactList

From Hiro Mizutani
DateWed, 11 Aug 2004 17:25:39 -0600
Subject Re: [greenstone-devel] sorting with AZCompactList
In-Reply-To (4119626D-583204AA-cs-waikato-ac-nz)
Hi Michael,

I change the line in collect.cfg to:
classify GenericList -metadata Occupation -groupsize 50 -leafnodesort
Name,PageNum

also, I tried:
classify GenericList -metadata Occupation -groupsize 50 -buttonname Howto
-leafnodesort Name,PageNum
(I editted Howto button to say "Occupation")

then, the Occupation button doesn't show up, anymore. It shows up fine when I
use:
classify AZCompactList -mingroup 1 -maxcompact 50 -metadata Occupation
-buttonname Howto -sort Name

any help would be appreciated.
-hiro


On Tuesday 10 August 2004 06:03 pm, Michael Dewsnip wrote:
> Hi,
>
> I've made it available at
> http://www.cs.waikato.ac.nz/~mdewsnip/greenstone/GenericList.pm.zip. You'll
> need to unzip it in your gsdlperllibclassify folder.
>
> You'll also need to change your collect.cfg file to use the new classifier.
> I've changed some of the option names to make more sense to me, so instead
> of
>
> classify AZCompactList -mingroup 1 -maxcompact 50 -metadata Occupation
> -sort Name
>
> you would use
>
> classify GenericList -metadata Occupation -alwaysgroup -groupsize 50
> -leafnodesort Name,PageNum
>
> The "-leafnodesort Name,PageNum" tells it to sort the leaf nodes by Name
> and then PageNum. You will probably find that the PageNums won't be sorted
> as you expect -- "11" will come before "9", etc. This is because a string
> comparison is done rather than a numerical comparison. If this is a problem
> then you can either change your PageNum metadata to have leading zeros (eg.
> "09"), or I can change the -leafnodesort option so that you can specify
> which metadata elements are numerical.
>
> Please let me know if you have any problems with the classifier.
>
> Regards,
>
> Michael
>
> Hiro Mizutani wrote:
> > Hi Michael,
> >
> > Yes, I'd like to use the one you created. Could you send it to me,
> > please?
> >
> > thanks in advance.
> > -hiro
> >
> > On Monday 09 August 2004 11:13 pm, Michael Dewsnip wrote:
> > > Hi Hiro,
> > >
> > > Do you still need this functionality?
> > >
> > > Late last year I created a version of the AZCompactList classifier that
> > > was much more general (and much smaller) than the current one, but I
> > > didn't have time to polish it enough to add into the main Greenstone
> > > code. It would probably do what you need, however, so let me know if
> > > you want it and I'll dust it off and send it to you.
> > >
> > > Regards,
> > >
> > > Michael
> > >
> > > Hiro Mizutani wrote:
> > > > Hi,
> > > >
> > > > I'm trying to sort by two metadata with AZCompactList classifier.
> > > > On my collect.cfg file, I have a line:
> > > >
> > > > classify AZCompactList -mingroup 1 -maxcompact 50 -metadata
> > > > Occupation -sort Name
> > > >
> > > > It sorts by Name correctly. But I'd like to sort on the next level
> > > > below by another medatada (PageNum).
> > > >
> > > > Has anyone modified the AZCompactList file to do this?
> > > >
> > > > thanks in advance.
> > > > -hiro
> > > > --
> > > > Hiro Mizutani
> > > > Staff Computing Support Specialist
> > > > Mansfield Library
> > > > (406)243-6063
> > > > hiro.mizutani@umontana.edu
> > > >
> > > > _______________________________________________
> > > > greenstone-devel mailing list
> > > > greenstone-devel@list.scms.waikato.ac.nz
> > > > https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel
> >
> > --
> > Hiro Mizutani
> > Staff Computing Support Specialist
> > Mansfield Library
> > (406)243-6063
> > hiro.mizutani@umontana.edu

--
Hiro Mizutani
Staff Computing Support Specialist
Mansfield Library
(406)243-6063
hiro.mizutani@umontana.edu