Thanks for your reply Erik (good book by the way) 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 I thought I did mention colons! 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! Gwyn -----Original Message----- From: Erik Hatcher [mailto:[EMAIL PROTECTED] Sent: 23 January 2006 01:38 To: [email protected] Subject: Re: Handling of colons in QueryParserTokenManager On Jan 21, 2006, at 2:16 PM, Gwyn Carwardine wrote: > Of course I think someone needs to go into the internals anyway... > on 1.4.3 > I get an index out of array bounds error (not a nice parse > exception) when > it tries to parse the following (which it should be able to do): > > ["fred" TO "joe"] > > Maybe this is fixed in 1.9 but I tried it on the www.lucenebook.com > search > assuming that was using a recent version and that generates a > server error! It does not generate a server error on lucenebook.com: <http://www.lucenebook.com/search?query=%5B%22fred%22+TO+%22joe%22%5D> Maybe you happened to hit the server at some point when there was an issue with the server itself (?), but I just tried it and get plenty of results. > It's a real shame that the QueryParserTokenManager had no comments > put in to > explain what on earth it's doing! Look at QueryParser.jj - that is where the rest is generated from, using JavaCC. Your subject mentions colons, but your example doesn't. Besides the range query example, is there an issue with colons that you want to ask about? Erik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
