[greenstone-users] RE: Help with sorting search results by date

From Allison Zhang
DateThu Aug 6 07:37:33 2009
Subject [greenstone-users] RE: Help with sorting search results by date
In-Reply-To (49D677AA-6050607-cs-waikato-ac-nz)
I sent a message to this list for help with sorting search results by date in April (see my original message from the bottom). I tried what Katherine suggested. I checked the metadata in the archive file and found the best metadata for sorting, which is Date.browse that has the format yyyymmdd.

I edited the import.pl file:

if (defined $collectcfg->{'sortmeta'} && (!defined $sortmeta || lc($sortmeta) eq "Date.browse")) {

$sortmeta = $collectcfg->{'sortmeta'};

}

But it did not work. The search results are still not sorting by date. What did I do wrong? Can anybody help?

Thank you very much!

Allison

> -----Original Message-----
> From: Katherine of Greenstone Team
> [mailto:greenstone_team@cs.waikato.ac.nz]
> Sent: Friday, April 03, 2009 4:55 PM
> To: Allison Zhang
> Cc: greenstone_team@cs.waikato.ac.nz
> Subject: Re: Help with sorting search results by date
>
> Hi Allison
>
> The basic way to get documents sorted is to use -sortmeta option to
> import.pl.
> Undo your edits and try that. One thing to check, make sure the
> metadata
> name is that same as used in the actual metadata. eg DC.Date.created -
> does it actually look like that? or dc.Date^created, for example. You
> can check some of the old archive files to see how the metadata has
> been
> stored.
>
> Is your date stored as yyyymmdd? sorting is just done lexicographically.
>
> Regards,
> Katherine
>
> Allison Zhang wrote:
> > Hi, Katherine,
> >
> > I hope you can help me with this problem.
> >
> > We are working on a collection of PDF files. It is VERY important to
> display the search results in the order of date. I set up the default
> search option as "all" so that the search results can be displayed in
> the build order. We also re-named our over 3000 PDF files in the date
> order hoping the build will go in the order of filename list. We did a
> test for a small pool of documents and it worked fine. But now, after
> we imported over 1000 documents, I found the search results did not
> display the results in date order.
> >
> > I also tried to edit the import.pl in the line:
> >
> > $sortmeta eq "DC.Date.created"
> >
> > (DC.Date.created is the metadata field we use for the date.)
> >
> > It did not work!
> >
> > What did I miss? What else I need to do in order to force the build
> to go by the filename list?
> >
> > Please help.
> >
> >
> > Thanks
> >
> >
> > Allison
> >