Solr
  1. Solr
  2. SOLR-8340

HighlightComponent throws a NullPointerException when the attribute of ResponseBuilder which named 'onePassDistributedQuery' is 'true' and 'rows' is greater than zero

    Details

    • Flags:
      Important

      Description

      When the attribute 'onePassDistributedQuery' is 'true',QueryCompoent will not send a ShardRequest to retrive field values, highlight values has been return by shards in createMainQuery together.
      See code below:

      private void handleRegularResponses(ResponseBuilder rb, ShardRequest sreq) {
      if ((sreq.purpose & ShardRequest.PURPOSE_GET_TOP_IDS) != 0)

      { //merge all id and score,and ResponseBuilder.resultIds just stored id between start to rows mergeIds(rb, sreq); }

      if ((sreq.purpose & ShardRequest.PURPOSE_GET_TERM_STATS) != 0)

      { updateStats(rb, sreq); }

      if ((sreq.purpose & ShardRequest.PURPOSE_GET_FIELDS) != 0)

      { //where ResponseBuilder.onePassDistributedQuery is true,highlight values was retrived at same time,but not truncated by 'start' and 'rows',just return top N(N=start+rows), returnFields(rb, sreq); }

      }

      1. solr.patch
        0.8 kB
        zengjie

        Activity

        Hide
        zengjie added a comment - - edited

        I fixed this issue by checking 'sdoc' is or not a null object ,but I'm not test this patch,just for reference

        Show
        zengjie added a comment - - edited I fixed this issue by checking 'sdoc' is or not a null object ,but I'm not test this patch,just for reference
        Hide
        Christine Poerschke added a comment -

        Summary of the issue and corresponding patch look good to me.

        Show
        Christine Poerschke added a comment - Summary of the issue and corresponding patch look good to me.
        Hide
        ASF subversion and git services added a comment -

        Commit 1716911 from Christine Poerschke in branch 'dev/trunk'
        [ https://svn.apache.org/r1716911 ]

        SOLR-8340: Fixed NullPointerException in HighlightComponent.

        Show
        ASF subversion and git services added a comment - Commit 1716911 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1716911 ] SOLR-8340 : Fixed NullPointerException in HighlightComponent.
        Hide
        ASF subversion and git services added a comment -

        Commit 1716917 from Christine Poerschke in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1716917 ]

        SOLR-8340: Fixed NullPointerException in HighlightComponent. (merge in revision 1716911 from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1716917 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1716917 ] SOLR-8340 : Fixed NullPointerException in HighlightComponent. (merge in revision 1716911 from trunk)
        Hide
        Christine Poerschke added a comment -

        Thanks zengjie!

        Show
        Christine Poerschke added a comment - Thanks zengjie !
        Hide
        David Smiley added a comment -

        Christine, can you please merge to 5.4 before it's released? This is a bug, after all.

        Show
        David Smiley added a comment - Christine, can you please merge to 5.4 before it's released? This is a bug, after all.
        Hide
        ASF subversion and git services added a comment -

        Commit 1717224 from Christine Poerschke in branch 'dev/branches/lucene_solr_5_4'
        [ https://svn.apache.org/r1717224 ]

        SOLR-8340: Fixed NullPointerException in HighlightComponent. (merge in revision 1716917 from branch_5x)

        Show
        ASF subversion and git services added a comment - Commit 1717224 from Christine Poerschke in branch 'dev/branches/lucene_solr_5_4' [ https://svn.apache.org/r1717224 ] SOLR-8340 : Fixed NullPointerException in HighlightComponent. (merge in revision 1716917 from branch_5x)
        Hide
        Christine Poerschke added a comment -

        Good catch. Fix now merged to 5.4 branch. solr/CHANGES.txt update on trunk and branch_5x w.r.t. 5.5 versus 5.4 section to follow.

        Show
        Christine Poerschke added a comment - Good catch. Fix now merged to 5.4 branch. solr/CHANGES.txt update on trunk and branch_5x w.r.t. 5.5 versus 5.4 section to follow.
        Hide
        ASF subversion and git services added a comment -

        Commit 1717226 from Christine Poerschke in branch 'dev/trunk'
        [ https://svn.apache.org/r1717226 ]

        SOLR-8340: move solr/CHANGES.txt entry from 5.4.0 to 5.5.0 section

        Show
        ASF subversion and git services added a comment - Commit 1717226 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1717226 ] SOLR-8340 : move solr/CHANGES.txt entry from 5.4.0 to 5.5.0 section
        Hide
        ASF subversion and git services added a comment -

        Commit 1717227 from Christine Poerschke in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1717227 ]

        SOLR-8340: move solr/CHANGES.txt entry from 5.4.0 to 5.5.0 section (merge in revision 1717226 from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1717227 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1717227 ] SOLR-8340 : move solr/CHANGES.txt entry from 5.4.0 to 5.5.0 section (merge in revision 1717226 from trunk)
        Hide
        ASF subversion and git services added a comment -

        Commit 1721931 from David Smiley in branch 'dev/branches/lucene_solr_5_3'
        [ https://svn.apache.org/r1721931 ]

        SOLR-8059 SOLR-8340: Fix HighlightComponent & DebugComponent finishStage NPE's when distrib.singlePass

        Show
        ASF subversion and git services added a comment - Commit 1721931 from David Smiley in branch 'dev/branches/lucene_solr_5_3' [ https://svn.apache.org/r1721931 ] SOLR-8059 SOLR-8340 : Fix HighlightComponent & DebugComponent finishStage NPE's when distrib.singlePass
        Hide
        ASF subversion and git services added a comment -

        Commit 1722062 from Anshum Gupta in branch 'dev/trunk'
        [ https://svn.apache.org/r1722062 ]

        SOLR-8340: Add change log entry to 5.3.2 section on trunk

        Show
        ASF subversion and git services added a comment - Commit 1722062 from Anshum Gupta in branch 'dev/trunk' [ https://svn.apache.org/r1722062 ] SOLR-8340 : Add change log entry to 5.3.2 section on trunk
        Hide
        ASF subversion and git services added a comment -

        Commit 1722063 from Anshum Gupta in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1722063 ]

        SOLR-8340: Add change log entry to 5.3.2 section (merge from trunk)

        Show
        ASF subversion and git services added a comment - Commit 1722063 from Anshum Gupta in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1722063 ] SOLR-8340 : Add change log entry to 5.3.2 section (merge from trunk)
        Hide
        ASF subversion and git services added a comment -

        Commit 1724184 from Adrien Grand in branch 'dev/branches/lucene_solr_5_4'
        [ https://svn.apache.org/r1724184 ]

        SOLR-8340: Add change log entry to 5.3.2 section.

        Show
        ASF subversion and git services added a comment - Commit 1724184 from Adrien Grand in branch 'dev/branches/lucene_solr_5_4' [ https://svn.apache.org/r1724184 ] SOLR-8340 : Add change log entry to 5.3.2 section.

          People

          • Assignee:
            David Smiley
            Reporter:
            zengjie
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development