You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Ryan McKinley <ry...@gmail.com> on 2007/12/03 06:44:23 UTC

query parsing error

In trunk, check:
http://localhost:8983/solr/select
  or
http://localhost:8983/solr/select?q=

In 1.2, this returns 400, "Missing required parameter: q"

Fix could be easy -- add a check in QueryComponent.prepare(), the hitch 
is that for qt=dismax, q is *not* a required param.

ryan

Re: query parsing error

Posted by Ryan McKinley <ry...@gmail.com>.
Yonik Seeley wrote:
> On Dec 3, 2007 12:44 AM, Ryan McKinley <ry...@gmail.com> wrote:
>> In trunk, check:
>> http://localhost:8983/solr/select
>>   or
>> http://localhost:8983/solr/select?q=
>>
>> In 1.2, this returns 400, "Missing required parameter: q"
>>
>> Fix could be easy -- add a check in QueryComponent.prepare(), the hitch
>> is that for qt=dismax, q is *not* a required param.
> 
> Could add the check in (Old)LuceneQParser.parse() for a null query
> string, and could treat a zero length query string the same way I
> guess.
> 

that sounds good -- each QParser would be responsible to make sure the 
qstr is valid.  We should also make sure the other QParsers give 
resonable errors for bad input.

ryan

Re: query parsing error

Posted by Yonik Seeley <yo...@apache.org>.
On Dec 3, 2007 12:44 AM, Ryan McKinley <ry...@gmail.com> wrote:
> In trunk, check:
> http://localhost:8983/solr/select
>   or
> http://localhost:8983/solr/select?q=
>
> In 1.2, this returns 400, "Missing required parameter: q"
>
> Fix could be easy -- add a check in QueryComponent.prepare(), the hitch
> is that for qt=dismax, q is *not* a required param.

Could add the check in (Old)LuceneQParser.parse() for a null query
string, and could treat a zero length query string the same way I
guess.

-Yonik