Lucene "maxClauseCount is set to 1024" error

Mihai Zamfira <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
Hello.
I use the latest version available on github of apache james jpa-guice which is integrated with LDAP and an external rdbms.
I get the following errors when mobile clients access the account via IMAP. The emails are downloaded to the phone, but in the log there are errors of the form below.
I don't know if this is specific only to the Iphone or not. 


07:51:39.182 [ERROR] o.a.j.i.p.AbstractMailboxProcessor - Unexpected error during IMAP processing
org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
	at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:136)
	at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:127)
	at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.createUidQuery(LuceneMessageSearchIndex.java:949)
	at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.createFlagQuery(LuceneMessageSearchIndex.java:1023)
	at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.createQuery(LuceneMessageSearchIndex.java:1208)
	at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.searchMultimap(LuceneMessageSearchIndex.java:523)
	at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.doSearch(LuceneMessageSearchIndex.java:491)
	at org.apache.james.mailbox.store.search.ListeningMessageSearchIndex.lambda$search$2(ListeningMessageSearchIndex.java:84)
	at com.github.fge.lambdas.supplier.SupplierChainer.lambda$sneakyThrow$195(SupplierChainer.java:74)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.apache.james.mailbox.store.search.ListeningMessageSearchIndex.search(ListeningMessageSearchIndex.java:84)
	at org.apache.james.mailbox.store.StoreMessageManager.search(StoreMessageManager.java:837)
	at org.apache.james.mailbox.store.StoreMessageManager.search(StoreMessageManager.java:132)
	at org.apache.james.imap.processor.SearchProcessor.performUidSearch(SearchProcessor.java:263)
	at org.apache.james.imap.processor.SearchProcessor.lambda$processRequestReactive$2(SearchProcessor.java:105)
	at com.github.fge.lambdas.functions.FunctionChainer.doApply(FunctionChainer.java:20)
	at com.github.fge.lambdas.functions.ThrowingFunction.apply(ThrowingFunction.java:17)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
	at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:251)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.