Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9970

provide apps details about why TooManyClauses was thrown

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • None
    • New

    Description

      Historically, if TooManyClauses was thrown it meant exactly one thing: That a QueryX Builder (typically BooleanQuery, but there are a few others in sandbox) was not going to allow it's caller to add a clause because that QueryX object already had the maxClauseCount in direct children.

      LUCENE-8811 added an additional "reason" why TooManyClauses may be thrown starting in 9.0: IndexSearcher may now throw this exception  if the (rewritten) Query being executed has a cumulative number of clauses – across the entire structure of nested Query objects – that exceeds the maxClauseCount.


      I think it would be helpful to users if it was possible to tell from the TooManyClauses exception how the maxClauseCount was exceeded (because of the total number of direct children during rewrite, or cumulatively across the entire nested structure) w/o needing to inspect the stack frames to see if the thrower a rewrite method, or a QueryVisitor method.

       

      Attachments

        1. LUCENE-9970.patch
          8 kB
          Chris M. Hostetter

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: