Hi,
> 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).
I have done this.
>
> >
> > 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
>
I tried these queries (there is some Dutch in these queries: begindatum =
start and einddatum = end):
dbg: command = /usr/local/bin/swish-e -d '"' -w record=(kunst) -L begindatum
'<=' 1925 -m 20 -b 1 -p auteur titel jaar begindatum einddatum -f
/usr0/tin-xml/rm/index/main.index|
This is ok. So is the other way around:
dbg: command = /usr/local/bin/swish-e -d '"' -w record=(kunst) -L einddatum
'>=' 1900 -m 20 -b 1 -p auteur titel jaar begindatum einddatum -f
/usr0/tin-xml/rm/index/main.index|
But the combination:
dbg: command = /usr/local/bin/swish-e -d '"' -w record=(kunst) -L begindatum
0000 1925 -L einddatum 1900 3000 -m 20 -b 1 -p auteur titel jaar begindatum
einddatum -f /usr0/tin-xml/rm/index/main.index|
gives all records. I am thinking of two possibilities:
1: swish is ignoring a double -L
2: swish combines a double -L with "or" and not with "and"
Regards
Frits
kunst = art
begindatum = start date
einddatum = end date
auteur = author
titel = title
jaar = publication year
Received on Fri Jul 26 07:52:01 2002