[ https://issues.apache.org/jira/browse/SOLR-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239023#comment-13239023 ]
Hoss Man commented on SOLR-435: ------------------------------- bq. Again I agree. But I'm just not sure if that validation / error checking should involve checking alternative parameters. That feels like its defeating the goal of QParsers working in all situations. Not sure i see the problem, ... part of the advantage in how q.alt it's implemented now is that you can put things like... {noformat} <str name="fq">!dismax q.alt=*:* v=$keywords}</str> {noformat} ...into "appends" params in your solrconfig. by default nothing is filtered, but if the client provides a "keywords" param then it's used. bq. I just also wonder whether down the line we want better error messages here too. David's suggestion for "missing query string" aligns with other such messages It wouldn't have to ... parse() can throw ParseExceptions and QueryCOmponent (or whatever delegated to the QParser can wrap that in a user error (QueryCOmponent already does that) > 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_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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org