Your client needs to know to submit the proper filter query conditionally. 
It's not really a spatial issue, and I disagree with the idea to make bbox
(and all other query parsers for that matter) do nothing if not given an
expected input.

~ David


bbarani wrote
> I am using the SOLR geospatial capabilities for filtering the results
> based on the particular radius (something like below).. I have added the
> below fq query in solrconfig and passing the latitude and longitude
> information dynamically but I am hardcoding the dynamic query in
> solrconfig.xml..
> 
> select?q=firstName:john&fq={!bbox%20sfield=geo%20pt=40.279392,-81.85891723%20d=10}
> 
>     
> <str name="q">
>         _query_:"{firstName=$firstName}"
>         
> </str>
>     
> <str name="fq">
>         _query_:"{!bbox pt=$fps_latlong sfield=geo d=$fps_dist}"
>         
> </str>
> Now when I pass the latitude and longitude data, the query works fine but
> whenever I dont pass the latitude / longitude data it throws exception..
> Is there a way to make fq optional? Is there a way to ignore spatial
> queries when the co ordinates are not passed? Looking for something like
> dismax, that doesnt throw any exceptions...





-----
 Author: http://www.packtpub.com/apache-solr-3-enterprise-search-server/book
--
View this message in context: 
http://lucene.472066.n3.nabble.com/SOLR-4-3-0-How-to-make-fq-optional-tp4066592p4066604.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to