Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6835

ReRankQuery throws NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.9, 4.10, 4.10.2
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      when I use ReRankQParserPlugin, I found if I leave reRankQuery paramter to null,then Solr will throw NullPointerException in ReRankQuery.hashCode() method. If reRankQuery parameter should not be null, It should be intercepted in ReRankQParser.parser() method to make it clear for users.

      1. SOLR-6835.patch
        3 kB
        Marius Grama
      2. SOLR-6835.patch
        4 kB
        Shalin Shekhar Mangar

        Issue Links

          Activity

          Hide
          joel.bernstein Joel Bernstein added a comment -

          Ok, I'll add error handling for this for 5.1.

          Show
          joel.bernstein Joel Bernstein added a comment - Ok, I'll add error handling for this for 5.1.
          Hide
          mariusneo Marius Grama added a comment -

          Attached patch containing error handling and unit test for testing the change.

          Show
          mariusneo Marius Grama added a comment - Attached patch containing error handling and unit test for testing the change.
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Thanks Marius. This patch changes the SyntaxError to a SolrException with a BAD_REQUEST code. I'll commit shortly.

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Thanks Marius. This patch changes the SyntaxError to a SolrException with a BAD_REQUEST code. I'll commit shortly.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1684904 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1684904 ]

          SOLR-6835: ReRankQueryParserPlugin checks now whether the reRankQuery parameter is present and not empty

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1684904 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1684904 ] SOLR-6835 : ReRankQueryParserPlugin checks now whether the reRankQuery parameter is present and not empty
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1684905 from shalin@apache.org in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684905 ]

          SOLR-6835: ReRankQueryParserPlugin checks now whether the reRankQuery parameter is present and not empty

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1684905 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684905 ] SOLR-6835 : ReRankQueryParserPlugin checks now whether the reRankQuery parameter is present and not empty
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Bulk close for 5.3.0 release

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              sbp810050504 帅广应
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development