OK, so I missed a couple of minus signs....
Please ignore me.? I'm slow sometimes.
Jim
On 9/11/21 4:26 PM, Jim wrote:> This is actually two questions.? I was trying to understand how to do
> ranges when I ran across the example, full-searcher.pl. I tried it
> with the sample date range in the usage message
>
> like this:
>
> perl full-searcher.pl /tmp/adb 25/12/1970..31/12/1979
> or perl full-searcher.pl /tmp/adb "25/12/1970..31/12/1979"
>
> But it tossed out the Usage: message so I have something wrong. Then I
> tried a few other things like
>
> perl full-searcher.pl /tmp/adb author:john title:"star wars"
> Exception: Xapian::DatabaseOpeningError=SCALAR(0x5640c48b0470)
>
> which doesn't seem right.
>
> My other question is this.
>
> I have a database where slot 4 has a date of the form 20210901120000
> (noon Sept 1, 2021) so I figured I'd just use a NumberRangeProcessor.
>
> ??? my $qp = Xapian::QueryParser->new();
> ??? my $numrange = new Xapian::NumberRangeProcessor( 4 );
>
> ??? $qp->add_rangeprocessor($numrange);
> I use scriptindex to generate the database and this is from the index
> file:
>
> ??? recdate: field index=XRD value=4
>
> Here's a partial dump of record 1
>
> Data for record #1:
> author=John Lance
> daterev=79773918656
> db=current
> recdate=20120327111447
> reference=cur/mail.svwindangel-1.com/INBOX/0004.html
> stringdate=20120327081344
>
> And here's what my query looks like before passed into parse_query
>
> Query 20101202000000..20210901000000 john
>
> So what's the secret?? Yes there are thousands of records in that date
> range.? I did remove the john from the query just for kicks. Nothing
> returned.
>
>
>