Re: [greenstone-users] dates

From Katherine Don
DateFri, 12 Dec 2003 09:22:24 +1300
Subject Re: [greenstone-users] dates
In-Reply-To (886EF25AF8BEF64EB89A820EF84064FF41BF7E-UCMAIL4)
Hi Linda

I have just tried adding the DateSearch format statement to my collections
config files - it worked (mostly) fine. The date stuff is added to the query
form below the query box and search button. The single format line is enough
to get the date options added.

I found one bug- it doesn't get added if you are using form searching (with
mgpp collections).
However, in all cases, my original search box and parameters were still
present.

What version of Greenstone are you using? I am using v2.41 - perhaps an older
version had a bug in this date stuff??

regards,
Katherine Don

"Newman, Linda (newmanld)" wrote:

> Thank you to John McPherson for clarifying the date format of YYYYMMDD
> instead of YYYY-MM-DD.
> That solved problem 1) below.
>
> In regard to the 2nd issue, when I include the statement "format
> QueryInterface DateSearch" in my collect.cfg file, it results in the
> following two problems:
>
> *My ordinary search options deriving from my other indexes (title, etc.)
> are gone.
>
> *The date query search form doesn't have a submit button or other way for
> the user to actually submit the date search.
>
> My guess is that there is some additional syntax beyond "format
> QueryInterface DateSearch" to solve these two issues, but I can find no
> mention of this format statement in any of the pdf files that I downloaded.
> Any one know how to extend this format statement?
>
> -----Original Message-----
> From: John R. McPherson [mailto:jrm21@cs.waikato.ac.nz]
> Sent: Tuesday, December 09, 2003 3:56 PM
> To: Newman, Linda (newmanld)
> Cc: greenstone-users@list.scms.waikato.ac.nz
> Subject: Re: [greenstone-users] dates
>
> On Tue, Dec 09, 2003 at 03:44:58PM -0500, Newman, Linda (newmanld) wrote:
> > 1) Display problem with dates:
> >
> > I'm using dates in my metadata.xml file, and although searching and
> browsing
> > seem to work correctly, the display of the date info is strange.
> >
> > I can't find anything specifying the format in any of the greenstone pdf
> > files, so I went with what I found online for the Dublin Core:
> YYYY-MM-DD.
> >
> >
> > However, the display of a field such as this:
> > <Metadata name="Date" mode="accumulate">1878-01-03</Metadata>
> >
> > will be shown as:
> > Date: 1- _textmonth-0_ 1878
> >
> > This display shows up both in the datelist classifier and in the
> > documentText format.
>
> Greenstone needs dates to be in YYYYMMYY format to be able to parse
> them.
> _textmonthXX_ is a greenstone macro that turns the XXth month into
> a string in the appropriate language... eg 20031210 (for 10th Dec 2003).
> So what has happened is that the plugin got 1878 as the year, and then
> "-0" as the month, which isn't a valid macro for a month name.
>
> > 2) Searching Question:
> > Is there a way to allow the user to search (not browse) within range of
> > dates, using either the MG or MGPP search engines?
>
> According to the BasPlug (base plugin), you can add an option called
> "-extract_historical_years" to any plugin, and also add
> " format QueryInterface DateSearch"
> to the collect.cfg file for searching based on the year.
>
> I have no idea if this actually works or not though... but I recall
> that it used to...
>
> John McPherson
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users