Solr
  1. Solr
  2. SOLR-2216

Highlighter query exceeds maxBooleanClause limit due to range query

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Implemented
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: highlighter
    • Labels:
      None
    • Environment:

      Description

      For a full detail of the issue, please see the mailing list: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201011.mbox/%3CAANLkTimE8z8yOni+u0Nsbgct1=eF7E+sU0_WAKu2cMno@mail.gmail.com%3E

      The nutshell version of the issue is that when I have a query that contains ranges on a specific (non-highlighted) field, the highlighter component is attempting to create a query that exceeds the value of maxBooleanClauses set from solrconfig.xml. This is despite my explicit setting of hl.field, hl.requireFieldMatch, and various other hightlight options in the query.

      As suggested by Koji in the follow-up response, I removed the range queries from my main query, and SOLR and highlighting were happy to fulfill my request. It was suggested that if removing the range queries worked that this might potentially be a bug, hence my filing this JIRA ticket. For what it is worth, if I move my range queries into an fq, I do not get the exception about exceeding maxBooleanClauses, and I get the effect that I was looking for.

        Issue Links

          Activity

          Hide
          Lance Norskog added a comment -

          Is this still a problem in 3.6, 4.0 or the trunk?

          Show
          Lance Norskog added a comment - Is this still a problem in 3.6, 4.0 or the trunk?
          Hide
          Reinier Kip added a comment -

          Yes, at least in 4.0-beta.

          Show
          Reinier Kip added a comment - Yes, at least in 4.0-beta.
          Hide
          Simon Endele added a comment -

          Am I right in assuming that this isn't a problem when using the FastVectorHighlighter or the PostingsHighlighter?

          Show
          Simon Endele added a comment - Am I right in assuming that this isn't a problem when using the FastVectorHighlighter or the PostingsHighlighter?
          Hide
          Cao Manh Dat added a comment -

          Currently, I do not think this is a problem of Solr. Because the code to create QueryScorer for Highlighting is quite simple

          QueryScorer scorer = new QueryScorer(query,
                 hl.requireFieldMatch == true ? fieldName : null);
          

          and

          if (reqFieldMatch) {
            return new QueryTermScorer(query, request.getSearcher().getIndexReader(), fieldName);
          } else {
            return new QueryTermScorer(query);
          }
          

          I think it is related to how Lucene rewrite the query, will try to dig deeper into Lucene code and figure out the changes.

          Show
          Cao Manh Dat added a comment - Currently, I do not think this is a problem of Solr. Because the code to create QueryScorer for Highlighting is quite simple QueryScorer scorer = new QueryScorer(query, hl.requireFieldMatch == true ? fieldName : null ); and if (reqFieldMatch) { return new QueryTermScorer(query, request.getSearcher().getIndexReader(), fieldName); } else { return new QueryTermScorer(query); } I think it is related to how Lucene rewrite the query, will try to dig deeper into Lucene code and figure out the changes.
          Hide
          Cassandra Targett added a comment -

          Cao Manh Dat, I added a link from this issue to LUCENE-7520 since I noticed this issue mentioned in the description there. Now that that issue is committed, do you believe we can close this? Or is there another test you'd like to run first?

          Show
          Cassandra Targett added a comment - Cao Manh Dat , I added a link from this issue to LUCENE-7520 since I noticed this issue mentioned in the description there. Now that that issue is committed, do you believe we can close this? Or is there another test you'd like to run first?
          Hide
          Cao Manh Dat added a comment -

          I think we can close this issues now, LUCENE-7520 is the root of the problem.

          Show
          Cao Manh Dat added a comment - I think we can close this issues now, LUCENE-7520 is the root of the problem.
          Hide
          Cassandra Targett added a comment -

          The fix is in LUCENE-7520.

          Show
          Cassandra Targett added a comment - The fix is in LUCENE-7520 .

            People

            • Assignee:
              Unassigned
              Reporter:
              Ken Stanley
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development