lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djd0383 <>
Subject Re: Searching with "1"
Date Tue, 03 Oct 2006 15:19:28 GMT

After thinking through what was happening in Hits, I decided to see if
catching a general exception would come back with anything.  Although it can
be argued that the code should have been doing this all along, that is a
different story.

So, I added Exception to the catch clauses, and it in fact catch the
TooManyClauses which allowed me to solve to problem.  My point though is
that if the code was to throw this exception and require me to catch it,
this problem would have fixed for me and potentially others as they are
writting the code.  As an Eclipse user, it is nice when I create a try/catch
that it puts in all the required catches from the code within the try.  If
you were to physically throw this exception, my try would have built the
catch when we created it, or at least errored that we needed it.  I was just
curious why you were not throwing it?

Again thanks for your help.

Chris Hostetter wrote:
> : It turns out that I was going over TooManyClauses, and this decided to
> give
> : an exception.
> :
> : I am not really sure of the reasoning behind this exception?  It seems
> to us
> : that it might be better to throw an exception.  This way the programmer
> can
> : handle this accordingly and will force them to do so.
> I'm not understanding your statement.  TooManyClauses is a runtime
> exception that can and will be thrown when a query like PrefixQuery is
> rewriten to a BooleanQuery -- which happens when a search is executed.
> so if your problem is that your prefix query was generating too many
> clauses -- that exception should have in fact been throws ... what do you
> mean by "this decided to give an exception." if the exception wasn't
> thrown?
> -Hoss
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message