lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Why does BooleanQuery$TooManyClauses extend RuntimeException?
Date Wed, 26 Nov 2003 17:10:09 GMT

On Wednesday, November 26, 2003, at 11:44  AM, Doug Cutting wrote:
> Erik Hatcher wrote:
>> I concur and have just modified QueryParser to throw a ParseException 
>> instead when a TooManyClauses exception is thrown.
> When using a prefix or wildcard query (where this is most likely to 
> occur) I don't think TooManyClauses is thrown under the parser, but 
> rather when searching, as the query isn't rewritten until it's 
> executed.

If that was the case, then this test would fail, right?

   public void testBooleanQuery() throws Exception {
     try {
       QueryParser.parse("one two three", "field", new 
       fail("ParseException expected due to too many boolean clauses");
     } catch (ParseException expected) {
       // too many boolean clauses, so ParseException is expected

But it passes.


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

View raw message