lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-435) QParser must validate existence/absence of "q" parameter
Date Tue, 27 Mar 2012 00:55:26 GMT

    [ https://issues.apache.org/jira/browse/SOLR-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239087#comment-13239087
] 

Hoss Man commented on SOLR-435:
-------------------------------

bq. I agree but I also think we should commit the improved error message suggested by David
so that we avoid the unhelpful NPE. Any broader changes will be in 4.0 so we don't have a
backwards compat problem.

Grrr... yes, i see ... SOLR-2001 is only on trunk, somehow i overlooked that and it contributed
to my confusion as to some of the comments in this issue.

So instead of NPEs or what not that you get in 3.5 from various parsers, we switch to consistent'new
ParseException("missing query string");' in 3.6, and address if there can be better default
handling in 4.0 (continuing what SOLR-2001 started)

+1
                
> QParser must validate existence/absence 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: David Smiley
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-435.patch, 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


Mime
View raw message