I\'ve had an app doing prefix searches for a while. Recently the index size was increased and it turned out that some prefixes were too darned numerous for lucene to handle.
When running a prefix query, Lucene searches for all terms in its "dictionary" that match the query. If more than 1024 (by default) match, the TooManyClauses-Exception is thrown.
You can call BooleanQuery.setMaxClauseCount to increase the maximum number of clauses permitted per BooleanQuery.