Re: [greenstone-users] Can we do range search in 2 date field?

From Katherine Don
DateMon, 03 Apr 2006 14:28:46 +1200
Subject Re: [greenstone-users] Can we do range search in 2 date field?
In-Reply-To (003001c64c99$8f6e36f0$39110893-syscng52601fx)
Hi Dave

You can't do this without modifying the code.

The current way we do range searching in the date search is to add all
the individual years into the query. eg searching from 2002 to 2005 gets
a query like "(2002 or 2003 or 2004 or 2005) in Date" (this is not the
actual syntax). And we only do this for one date field.

If you really want this functionality, you could modify the code to have
multiple date ranges.
Or you may be able to do it easier with Lucene, which handles range
searching natively. You can build a collection with lucene by enabling
advanced searches in gli (design->search types) and choosing lucene as
the indexer.

you could perhaps write a new macro file for the query page which puts
up two date range boxes, then using javascript, adds the appropriate
bits into the query string before it gets sent to greenstone.

I can give you more help with either of these if you decide to implement


Dave Low wrote:
> Dear all,
> I have a database contain 2 date fields, say dfa and dfb.
> Can I do range search on these 2 fields separately, i.e. a range for dfa
> another range for dfb?
> Thanks.
> Dave
> ------------------------------------------------------------------------
> _______________________________________________
> greenstone-users mailing list