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

QParser must validate existence/absence of "q" parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3
    • 3.6, 4.0-ALPHA
    • search
    • None

    Description

      Each QParser should check if "q" exists or not. For some it will be required others not.
      currently it throws a null pointer:

      java.lang.NullPointerException
      	at org.apache.solr.common.util.StrUtils.splitSmart(StrUtils.java:36)
      	at org.apache.solr.search.OldLuceneQParser.parse(LuceneQParserPlugin.java:104)
      	at org.apache.solr.search.QParser.getQuery(QParser.java:80)
      	at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:67)
      	at org.apache.solr.handler.SearchHandler.handleRequestBody(SearchHandler.java:150)
              ...
      

      see:
      http://www.nabble.com/query-parsing-error-to14124285.html#a14140108

      Attachments

        1. SOLR-435.patch
          11 kB
          Chris M. Hostetter
        2. SOLR-435_q_defaults_to_all-docs.patch
          6 kB
          David Smiley
        3. SOLR-435_3x_consistent_errors.patch
          4 kB
          Chris M. Hostetter
        4. SOLR-2001_3x_backport_with_empty_string_check_and_test.patch
          10 kB
          David Smiley

        Issue Links

          Activity

            People

              dsmiley David Smiley
              ryantxu Ryan McKinley
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: