Index: BooleanQuery.java =================================================================== --- BooleanQuery.java (revision 165147) +++ BooleanQuery.java (working copy) @@ -31,7 +31,8 @@ /** The maximum number of clauses permitted. Default value is 1024. * Use the org.apache.lucene.maxClauseCount system property - * to override. + * to override. If a failure to get the system property occurs, perhaps because + * Lucene is being used in an unsigned applet, use the default. *

TermQuery clauses are generated from for example prefix queries and * fuzzy queries. Each TermQuery needs some buffer space during search, * so this parameter indirectly controls the maximum buffer requirements for @@ -43,9 +44,14 @@ * {@link org.apache.lucene.store.MMapDirectory} the buffering is left to * the operating system. */ - public static int maxClauseCount = - Integer.parseInt(System.getProperty("org.apache.lucene.maxClauseCount", - "1024")); + public static int maxClauseCount; + static { + try { + maxClauseCount = Integer.parseInt(System.getProperty("org.apache.lucene.maxClauseCount", "1024")); + } catch ( Exception e ) { + maxClauseCount = 1024; + } + } /** Thrown when an attempt is made to add more than {@link * #getMaxClauseCount()} clauses. This typically happens if