org.apache.lucene.search.BooleanQuery$TooManyClauses

Atlassian JIRA | Arne Schirmacher (Pix Software GmbH) | 9 years ago
  1. 0

    When entering the first character into the {livesearch} search box, an exception is thrown, which is displayed in the results area of the macro (it is the standard "A system error has occurred - our apologies! " error message). After entering the second character everything is normal and I can see the usual list of matches. The confluence website is very large, probably a few hundred MByte of text. I tried the same {livesearch} macro on confluence.atlassian.com and it does not throw an exception even though I think your site has even more text. The installed Confluence release is 2.5.3, but it is heavily modified. It is fully possible that this problem is caused by missing or modified properties, or by other side effects of the customisation. However I am not sure how to attack this problem. My guess so far is: On entering the first character, for example an "e", the lucene search attempts to execute a "e*" wildcard search which returns so many matches that some limit is exceeded. But then why does this not happen on confluence.atlassian.com which should also have a large number of matches for this particular search? Is there a way to start the search only after at least two characters have been entered? Maybe the livesearch JavaScript code is supposed to suppress such exceptions, but the code does not work as expected in our environment, the error message is not suppressed but displayed to the user. Here is the full exception: org.apache.lucene.search.BooleanQuery$TooManyClauses at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:184) Stack Trace: [hide] org.apache.lucene.search.BooleanQuery$TooManyClauses at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:184) at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:175) at org.apache.lucene.search.PrefixQuery.rewrite(PrefixQuery.java:52) at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:396) at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:381) at com.atlassian.bonnie.search.LuceneSearcher$2.perform(LuceneSearcher.java:117) at com.atlassian.bonnie.LuceneConnection.withReader(LuceneConnection.java:195) at com.atlassian.bonnie.search.LuceneSearcher.rewrite(LuceneSearcher.java:113) at com.atlassian.confluence.search.actions.SearchSiteAction.execute(SearchSiteAction.java:119) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:48) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:47) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:114) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:67) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.actions.LastModifiedInterceptor.intercept(LastModifiedInterceptor.java:39) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:25) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:98) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115) at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:229) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:117) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:137) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:159) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:172) at com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:122) at com.atlassian.core.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.core.filters.gzip.GzipFilter.doFilter(GzipFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Referer URL: http://wikia02s.xxxxxx.com/display/test/Home Build Information: confluence.home: /home/tcrun/cf_home system.uptime: 5 days, 21 hours, 38 minutes, 46 seconds system.version: 2.5.3 build.number: 808 Server Information: Application Server: Apache Tomcat/5.0 Servlet Version: 2.4 Database Dialect: net.sf.hibernate.dialect.Oracle9Dialect Database Driver Name: N/A Database Driver Version: N/A Memory Information: total.memory: 760 MB free.memory: 410 MB used.memory: 350 MB System Information: system.date: Thursday, 30 Aug 2007 system.time: 14:57:00 system.favourite.colour: Myrtle java.version: 1.4.2_09 java.vendor: Sun Microsystems Inc. jvm.version: 1.0 jvm.vendor: Sun Microsystems Inc. jvm.implementation.version: 1.4.2_09-b05 java.runtime: Java(TM) 2 Runtime Environment, Standard Edition java.vm: Java HotSpot(TM) Server VM user.name.word: tcrun user.timezone: MET operating.system: SunOS 5.8 os.architecture: sparc fs.encoding: ISO646-US Cluster Information: Not clustered. Enabled Plugins: Glossary (confluence.extra.glossary, Version: 0.0) Linking Plugin (net.customware.confluence.plugin.linking, Version: 2.3.2) Basic Macros (confluence.macros.basic, Version: 1.3) HTML Macros (confluence.macros.html, Version: 1.3) Chart Plugin (confluence.extra.chart, Version: 1.8) User Listener (confluence.extra.userlister, Version: 1.2) Global Labels Sections (confluence.sections.labels, Version: 1.0) Information Macros (confluence.extra.information, Version: 0.2) Page Operations (confluence.sections.page.operations, Version: 1.0) WebDAV Plugin (confluence.extra.webdav, Version: 1.1) Profile Tabs (confluence.sections.profile, Version: 1.0) Confluence Remote API (confluence.extra.confluencerpc, Version: 1.4) Core Startup and Shutdown (confluence.lifecycle.core, Version: 1) Admin Sections (confluence.sections.admin, Version: 1.0) Navigation Plugin (com.pentec.confluence.navigation, Version: 1.11) Table of Contents Plugin (org.randombits.confluence.toc, Version: 2.3.2) TinyMCE Editor Plugin (com.atlassian.confluence.extra.tinymceplugin, Version: 1.12) Space Pages Sections (confluence.sections.space.pages, Version: 1.0) Approvals Workflow Plugin (com.comalatech.workflow, Version: 0.9.3) News Tabs (confluence.sections.news, Version: 1.0) Space Advanced Sections (confluence.sections.space.advanced, Version: 1.0) Confluence Contributors Plugin (com.atlassian.confluence.contributors, Version: 1.1) Attachments Macros (confluence.extra.attachments, Version: 1.4) IM Presence Macros (confluence.extra.impresence, Version: 0.1) Space Actions Sections (confluence.sections.space.actions, Version: 1.0) Task List Macros (confluence.extra.tasklist, Version: 1.3) Space Labels Sections (confluence.sections.space.labels, Version: 1.0) Dynamic Task List Macros (confluence.extra.dynamictasklist, Version: 1.5) Core Extractors (confluence.extractors.core, Version: 1.4) Compatibility Macros (confluence.macros.compatibility, Version: 1.3) Page Tabs (confluence.sections.page, Version: 1.0) Core Listeners (confluence.listeners.core, Version: 1.3) Dashboard Macros (confluence.macros.dashboard, Version: 1.3) Live Search Macros (confluence.extra.livesearch, Version: 1.6) Page View Links (confluence.sections.page.actions, Version: 1.0) Visibility Plugin (net.customware.confluence.plugin.visibility, Version: 1.5) JIRA Macros (confluence.extra.jira, Version: 1.6) Clickr Theme (com.atlassian.confluence.themes.clickr, Version: 0.9.1) Layout Macros (confluence.extra.layout, Version: 0.2) ImageMap Macros (de.dl.confluence.plugin.imagemap.ImageMapPlugin, Version: 1.0) Tabular Metadata (confluence.extra.masterdetail, Version: 1.0) Space Admin Sections (confluence.sections.space.admin, Version: 1.0) Advanced Macros (confluence.macros.advanced, Version: 1.3) IM Presence NG Plugin (confluence.extra.impresence2, Version: 2.0-rc2) Atlassian Plugin Repository (confluence.repository.client, Version: 2.0.4) Edit Profile Sections (confluence.sections.profile.edit, Version: 1.0) Attachment Extractors (confluence.extractors.attachments, Version: 1.4) Bulk User Upload (com.artemistech.confluence.plugins.bulkuserupload, Version: 2.0) Left Navigation Theme (com.atlassian.confluence.themes.leftnavigation, Version: 1.0) BloggingRPC (com.atlassian.confluence.plugins.xmlrpc.bloggingrpc, Version: 1.2.1) Space Item Tabs (confluence.sections.space, Version: 1.0) Code Macro (confluence.macros.code, Version: 1.4) Request Information: URL: http://wikia02s.xxxxxx.com/plugins/livesearch/livesearch.action - Scheme: http - Server: wikia02s.xxxxxx.com - Port: 80 - URI: /500page.jsp - - Context Path: - - Servlet Path: /500page.jsp - - Path Info: null - - Query String: decorator=none&searchQuery.queryString=s*&spaceKey= Attributes: - javax.servlet.forward.request_uri : /plugins/livesearch/livesearch.action - javax.servlet.forward.context_path : - javax.servlet.forward.servlet_path : /plugins/livesearch/livesearch.action - javax.servlet.forward.path_info : /500page.jsp - javax.servlet.forward.query_string : decorator=none&searchQuery.queryString=s*&spaceKey= - javax.servlet.error.message : - javax.servlet.error.exception : org.apache.lucene.search.BooleanQuery$TooManyClauses - os_securityfilter_already_filtered : true - __sitemesh__using_stream : false - com.atlassian.johnson.filters.JohnsonFilter_already_filtered : true - javax.servlet.error.request_uri : /plugins/livesearch/livesearch.action - javax.servlet.error.status_code : 500 - __sitemesh__filterapplied : true - javax.servlet.error.servlet_name : action - webwork.valueStack : com.opensymphony.xwork.util.OgnlValueStack@7424f8 - atlassian.core.seraph.original.url : /plugins/livesearch/livesearch.action?decorator=none&searchQuery.queryString=s*&spaceKey= - loginfilter.already.filtered : true - javax.servlet.jsp.jspException : org.apache.lucene.search.BooleanQuery$TooManyClauses - sessioninview.FILTERED : true - com.atlassian.core.filters.gzip.GzipFilter_already_filtered : true Parameters: - decorator = none - spaceKey = - searchQuery.queryString = s* Confluence User: - anonymous Logging: 0 log statements generated by this request.

    Atlassian JIRA | 9 years ago | Arne Schirmacher (Pix Software GmbH)
    org.apache.lucene.search.BooleanQuery$TooManyClauses
  2. 0

    Node Manager errors in workbench 3.5

    Google Groups | 6 years ago | Chuck
    org.apache.lucene.search.BooleanQuery$TooManyClauses
  3. 0

    BooleanQuery$TooManyClauses | Lucene | Java-User

    gossamer-threads.com | 6 months ago
    org.apache.lucene.search.BooleanQuery$TooManyClauses
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to tweak lucene maxClauseCount from Neo4j?

    Stack Overflow | 3 years ago | Debajyoti Roy
    java.lang.RuntimeException: org.apache.lucene.queryParser.ParseException: Cannot parse 'MEMBER_PLAN_ID:(1 2)': too many boolean clauses
  6. 0

    Error when searching the Content Manager with wildcards

    Stack Overflow | 4 years ago | Kevin Brydon
    org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 10240

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.lucene.search.BooleanQuery$TooManyClauses

      No message provided

      at org.apache.lucene.search.BooleanQuery.add()
    2. Lucene
      BooleanQuery.add
      1. org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:184)
      1 frame