Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46AA09A97 for ; Sat, 24 Mar 2012 03:42:07 +0000 (UTC) Received: (qmail 48084 invoked by uid 500); 24 Mar 2012 03:42:06 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 47949 invoked by uid 500); 24 Mar 2012 03:42:05 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 47777 invoked by uid 99); 24 Mar 2012 03:42:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2012 03:42:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2012 03:42:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DD3DF343D21 for ; Sat, 24 Mar 2012 03:41:39 +0000 (UTC) Date: Sat, 24 Mar 2012 03:41:39 +0000 (UTC) From: "Chris Male (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <685580581.12248.1332560500028.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (SOLR-435) QParser must validate existance/absense of "q" parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237418#comment-13237418 ] Chris Male commented on SOLR-435: --------------------------------- {quote} Chris, as both Hoss and I said, QueryComponent can't assume that the particular QParser subclass even needs the query string at all, such as when defType=term or something. Granted that's very unusual but still. {quote} That's exactly what I'm saying. The QueryComponent is making that assumption today. It retrieves a query string from the 'q' param and passes it to the QParser. Why not let the QParser do this all itself? that way, if the QParser doesn't need a query string or gets it from somewhere else, it can choose what to do or what not to do. > QParser must validate existance/absense of "q" parameter > -------------------------------------------------------- > > Key: SOLR-435 > URL: https://issues.apache.org/jira/browse/SOLR-435 > Project: Solr > Issue Type: Bug > Components: search > Affects Versions: 1.3 > Reporter: Ryan McKinley > Assignee: Ryan McKinley > Fix For: 3.6, 4.0 > > Attachments: SOLR-435_q_defaults_to_all-docs.patch > > > Each QParser should check if "q" exists or not. For some it will be required others not. > currently it throws a null pointer: > {code} > 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) > ... > {code} > see: > http://www.nabble.com/query-parsing-error-to14124285.html#a14140108 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org