You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Terry Steichen <te...@net-frame.com> on 2002/11/13 17:18:51 UTC

Change in Range Query Syntax?

I recently upgraded (from 1.2) to the latest build (1.3.1) and found that my range queries no longer work.

Here's what a simple query against my index yields:
pub_date:20021109 yields 133 hits
pub_date:20021110 yields 225 hits
pub_date:20021111 yields 144 hits

With 1.2RC5 and 1.2, here's how the range query works:
pub_date:[20021109 - 20021111] yields 502 hits (note space on both sides of dash)

With 1.3 (nightly build as of 11/11/02), here's how the range query now works:
pub_date:[20021109 - 20021111] yields 0 hits (note space on both sides of dash)
pub_date:[20021109- 20021111] yields 369 hits (note space only following the dash)
pub_date:[20021109-20021111] yields 0 hits (note no spaces on either side of dash)

Also, note that pub_date:]20021109- 20021110] does *not* include the hits for 20021109 as it did previously.

The errors (ParseExceptions) generated were these:
 Was expecting one of:
     "TO" ...
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...
     , Encountered "]" at line 1, column 27.
 Was expecting one of:
     "TO" ...
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...

Has the syntax changed, or is this a bug?

Regards,

Terry


Re: Change in Range Query Syntax?

Posted by Herman Chen <hc...@intumit.com>.
I was surprised by this change too.  I think the syntax changed from [from -
to] to [from to].

----- Original Message -----
From: "Terry Steichen" <te...@net-frame.com>
To: "Lucene Users Group" <lu...@jakarta.apache.org>
Sent: Thursday, November 14, 2002 12:18 AM
Subject: Change in Range Query Syntax?


I recently upgraded (from 1.2) to the latest build (1.3.1) and found that my
range queries no longer work.

Here's what a simple query against my index yields:
pub_date:20021109 yields 133 hits
pub_date:20021110 yields 225 hits
pub_date:20021111 yields 144 hits

With 1.2RC5 and 1.2, here's how the range query works:
pub_date:[20021109 - 20021111] yields 502 hits (note space on both sides of
dash)

With 1.3 (nightly build as of 11/11/02), here's how the range query now
works:
pub_date:[20021109 - 20021111] yields 0 hits (note space on both sides of
dash)
pub_date:[20021109- 20021111] yields 369 hits (note space only following the
dash)
pub_date:[20021109-20021111] yields 0 hits (note no spaces on either side of
dash)

Also, note that pub_date:]20021109- 20021110] does *not* include the hits
for 20021109 as it did previously.

The errors (ParseExceptions) generated were these:
 Was expecting one of:
     "TO" ...
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...
     , Encountered "]" at line 1, column 27.
 Was expecting one of:
     "TO" ...
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...

Has the syntax changed, or is this a bug?

Regards,

Terry





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Resubmit: Change in Range Query Syntax?

Posted by Terry Steichen <te...@net-frame.com>.
This is a resubmission of this question/issue.  I am very appreciative of
what the Lucene team has been doing, so I hope I don't sound impatient.  But
I can't begin comprehensive testing of the latest build until this is
resolved (because I'm going to have to first change a lot of existing code
if the range query syntax has actually been intentionally changed).

Regards,

Terry

----- Original Message -----
From: "Terry Steichen" <te...@net-frame.com>
To: "Lucene Users Group" <lu...@jakarta.apache.org>
Sent: Wednesday, November 13, 2002 11:18 AM
Subject: Change in Range Query Syntax?


I recently upgraded (from 1.2) to the latest build (1.3.1) and found that my
range queries no longer work.

Here's what a simple query against my index yields:
pub_date:20021109 yields 133 hits
pub_date:20021110 yields 225 hits
pub_date:20021111 yields 144 hits

With 1.2RC5 and 1.2, here's how the range query works:
pub_date:[20021109 - 20021111] yields 502 hits (note space on both sides of
dash)

With 1.3 (nightly build as of 11/11/02), here's how the range query now
works:
pub_date:[20021109 - 20021111] yields 0 hits (note space on both sides of
dash)
pub_date:[20021109- 20021111] yields 369 hits (note space only following the
dash)
pub_date:[20021109-20021111] yields 0 hits (note no spaces on either side of
dash)

Also, note that pub_date:]20021109- 20021110] does *not* include the hits
for 20021109 as it did previously.

The errors (ParseExceptions) generated were these:
 Was expecting one of:
     "TO" ...
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...
     , Encountered "]" at line 1, column 27.
 Was expecting one of:
     "TO" ...
     <RANGEIN_QUOTED> ...
     <RANGEIN_GOOP> ...

Has the syntax changed, or is this a bug?

Regards,

Terry




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>