Re: svn commit: r741097 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/handler/component/QueryComponent.java
I'm not sure this is right It is the query parser that knows if 'q' is required or not. On Feb 5, 2009, at 8:10 AM, sha...@apache.org wrote: Author: shalin Date: Thu Feb 5 13:10:33 2009 New Revision: 741097 URL: http://svn.apache.org/viewvc?rev=741097view=rev Log: Reverting SOLR-435 (always run tests before committing) Modified: lucene/solr/trunk/CHANGES.txt lucene/solr/trunk/src/java/org/apache/solr/handler/component/ QueryComponent.java Modified: lucene/solr/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=741097r1=741096r2=741097view=diff = = = = = = = = == --- lucene/solr/trunk/CHANGES.txt (original) +++ lucene/solr/trunk/CHANGES.txt Thu Feb 5 13:10:33 2009 @@ -236,8 +236,6 @@ 27. SOLR-991: Better error message when parsing solrconfig.xml fails due to malformed XML. Error message notes the name of the file being parsed. (Michael Henson via shalin) -28. SOLR-435: NullPointerException with no query or empty query (ryan, Lars Kotthoff via shalin) - Other Changes -- Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/ component/QueryComponent.java URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/component/QueryComponent.java?rev=741097r1=741096r2=741097view=diff = = = = = = = = == --- lucene/solr/trunk/src/java/org/apache/solr/handler/component/ QueryComponent.java (original) +++ lucene/solr/trunk/src/java/org/apache/solr/handler/component/ QueryComponent.java Thu Feb 5 13:10:33 2009 @@ -74,12 +74,7 @@ defType = defType==null ? OldLuceneQParserPlugin.NAME : defType; if (rb.getQueryString() == null) { - rb.setQueryString(params.get(CommonParams.Q)); - String queryString = params.get(CommonParams.Q); - if (queryString == null) { -throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, -Missing or empty required parameter: q); - } + rb.setQueryString( params.get( CommonParams.Q ) ); } try {
Re: svn commit: r741097 - in /lucene/solr/trunk: CHANGES.txt src/java/org/apache/solr/handler/component/QueryComponent.java
Yes, sorry about that. I committed this first and ran the tests later. I've reverted this change for now and I'll re-open the issue. On Thu, Feb 5, 2009 at 7:50 PM, Ryan McKinley ryan...@gmail.com wrote: I'm not sure this is right It is the query parser that knows if 'q' is required or not. On Feb 5, 2009, at 8:10 AM, sha...@apache.org wrote: Author: shalin Date: Thu Feb 5 13:10:33 2009 New Revision: 741097 URL: http://svn.apache.org/viewvc?rev=741097view=rev Log: Reverting SOLR-435 (always run tests before committing) Modified: lucene/solr/trunk/CHANGES.txt lucene/solr/trunk/src/java/org/apache/solr/handler/component/QueryComponent.java Modified: lucene/solr/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=741097r1=741096r2=741097view=diff == --- lucene/solr/trunk/CHANGES.txt (original) +++ lucene/solr/trunk/CHANGES.txt Thu Feb 5 13:10:33 2009 @@ -236,8 +236,6 @@ 27. SOLR-991: Better error message when parsing solrconfig.xml fails due to malformed XML. Error message notes the name of the file being parsed. (Michael Henson via shalin) -28. SOLR-435: NullPointerException with no query or empty query (ryan, Lars Kotthoff via shalin) - Other Changes -- Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/component/QueryComponent.java URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/component/QueryComponent.java?rev=741097r1=741096r2=741097view=diff == --- lucene/solr/trunk/src/java/org/apache/solr/handler/component/QueryComponent.java (original) +++ lucene/solr/trunk/src/java/org/apache/solr/handler/component/QueryComponent.java Thu Feb 5 13:10:33 2009 @@ -74,12 +74,7 @@ defType = defType==null ? OldLuceneQParserPlugin.NAME : defType; if (rb.getQueryString() == null) { - rb.setQueryString(params.get(CommonParams.Q)); - String queryString = params.get(CommonParams.Q); - if (queryString == null) { -throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, -Missing or empty required parameter: q); - } + rb.setQueryString( params.get( CommonParams.Q ) ); } try { -- Regards, Shalin Shekhar Mangar.