You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by vit <bu...@yahoo.com> on 2014/05/30 15:01:01 UTC

How to check and handle empty Solr query

In my code sometimes I get an emty query. Namely ... q=&.... which causes
"bad request" exception. 
How to gracefully check query correctness and bypass execution if it is not
correct.



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-check-and-handle-empty-Solr-query-tp4138877.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to check and handle empty Solr query

Posted by Jack Krupansky <ja...@basetechnology.com>.
Consider using the edismax query parser, which allows you to specify q.alt 
which is an alternative query such as "*:". Or use an application layer to 
handle the situation before it gets to Solr.

-- Jack Krupansky

-----Original Message----- 
From: vit
Sent: Friday, May 30, 2014 9:01 AM
To: solr-user@lucene.apache.org
Subject: How to check and handle empty Solr query

In my code sometimes I get an emty query. Namely ... q=&.... which causes
"bad request" exception.
How to gracefully check query correctness and bypass execution if it is not
correct.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-check-and-handle-empty-Solr-query-tp4138877.html
Sent from the Solr - User mailing list archive at Nabble.com.