Solr
  1. Solr
  2. SOLR-6835

ReRankQuery throws NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
        4 kB
        Shalin Shekhar Mangar
      2. SOLR-6835.patch
        3 kB
        Marius Grama

        Issue Links

          Activity

          Hide
          Joel Bernstein added a comment -

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

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

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

          Show
          Marius Grama added a comment - Attached patch containing error handling and unit test for testing the change.
          Hide
          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
          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
          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
          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
          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
          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
          Shalin Shekhar Mangar added a comment -

          Bulk close for 5.3.0 release

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development