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=741097&view=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=741097&r1=741096&r2=741097&view=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=741097&r1=741096&r2=741097&view=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 {



Reply via email to