Skip to main content.
home | support | download

Back to List Archive

Re: Searching beetween dates in different propnames

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Thu Jul 25 2002 - 16:06:24 GMT
On Thu, 25 Jul 2002, Frits van Latum wrote:

> I have another problem with searching between dates. I am indexing XML data
> (bibliographic data) that have two elements/propnames: start and end. This
> is to indicate a period. Example:
> 
> <record>
> <title>The sixties</title>
> ..
> <start>1965</start>
> <end>1975</end>
> </record>

Ok, so when indexing you need to set a propertyname for each of those
tags.

   PropertyNamesNumeric start end

In this case you probably don't need to use a numeric property since your
numbers are all 4 digits (and will thus compare correctly as strings).

> 
> So I want to do something like this:
> 
> 	give me all records that are about the period 1960-1970
> 		equals:
> 	give me all records with:  (end >= 1960) AND (start <= 1970)
> 		equals:
> 	swish-e ... -L end >= 1960 -L start <= 1970
> 
> The example given should be found with this query!
> 
> Can Swish do anything like this? If so: what is the correct syntax.

 
http://swish-e.org/2.2/docs/SWISH-RUN.html#Searching_Command_Line_Arguments

Untested, but I think it would be something like:

   swish-e -L end 1960 2002 -L start 0 1970
 

-- 
Bill Moseley moseley@hank.org
Received on Thu Jul 25 16:11:13 2002