On Apr 5, 2005, at 10:50 PM, Jason Eacott wrote:
Hi,
I recently upgraded from lucene 1.3 final to 1.4 and discovered some things
which no longer seem to work right.
anyway -
if I run a query something like
[EMAIL PROTECTED]: [EMAIL PROTECTED]:"2004"[EMAIL PROTECTED]:"February"+properties
@committee:"Council"
it no longer works unless I ensure there are spaces around each +
eg this works
[EMAIL PROTECTED]:false + [EMAIL PROTECTED]:"2004" + [EMAIL PROTECTED]:"February" +
[EMAIL PROTECTED]:"Council"
can anyone tell me if this has been fixed somewhere or whether this was by design? (I
cannot imagine that it is)
This was by design. The issue is where to draw the boundaries for terms. In 1.3, "Wal-mart" was treated as "wal NOT mart" so we added "-" and "+" to be considered term characters.
This change is noted in the CHANGES.txt file that is packaged with Lucene distributions, and says this:
13. Changed QueryParser.jj to allow '-' and '+' within tokens: http://issues.apache.org/bugzilla/show_bug.cgi?id=27491 (Morus Walter via Otis)
In other words, you'll need to add whitespace, or if this is a drastic issue for your users you can clone QueryParser and change the grammar slightly (remove "+" and "-" from #_TERM_CHAR and use your custom query parser.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]