On Jan 23, 2006, at 6:24 AM, Gwyn Carwardine wrote:
It definitely was producing the error. I was very careful to test
before I
posted. But now, as you say, it doesn't do it.
However, I wonder if I was entering ["Fred" TO "joe"] (note the
capital F)
because that IS still coming back with HTTP 500 error every time.
http://www.lucenebook.com/search?query=%5B%22Fred%22+TO+%22joe%22%5D
Sure enough. Wow - you win the prize for finding a bug. I believe,
but not sure yet, that this is due to a TooManyClauses error.
Format of a query part in Lucene is field:value
However if the value itself contains a colon then the
QueryParserTokenManager seems to truncate the value at that point.
I would
like to change this behaviour, in fact I think it's behaving
illogically..
the Token Manager's job is to parse into field & value, it
shouldn't make
any decisions about the value; that value should get passed intact
(complete
with colons and any other special characters) through to the
Analyzer who's
job it is to.. well.. analyse!
QueryParser certainly has issues when it comes to special characters,
escaping, and analysis. It's a tricky balancing act, and it
certainly does not apply in non-standard circumstances. Most
commonly special characters aren't relevant to a fields value, as
they are discarded during analysis. You've got a special case and
need to deal with it uniquely, with QueryParser not being suitable.
Whether it makes sense to adjust QueryParser or not, I'm not sure -
looks like there is an improvement with colon handling needed.
Again, changes to QueryParser occur in QueryParser.jj, not any of
the .java files that are generated.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]